nixpkgs/pkgs/development/tools/fnm/default.nix

44 lines
1.0 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, installShellFiles
, DiskArbitration
, Foundation
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "fnm";
2022-01-11 08:47:04 +00:00
version = "1.29.2";
src = fetchFromGitHub {
owner = "Schniz";
repo = pname;
rev = "v${version}";
2022-01-11 08:47:04 +00:00
sha256 = "sha256-9U0AOFlD7SROTditW/lv12BtvfstCkU5QOMA/19KG+k=";
};
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isDarwin [ DiskArbitration Foundation Security ];
2022-01-11 08:47:04 +00:00
cargoSha256 = "sha256-l5H8O0OLnnv3kku/e6yK0Ps1VcIY5YoR5yFTk5w3h4k=";
doCheck = false;
postInstall = ''
installShellCompletion --cmd fnm \
--bash <($out/bin/fnm completions --shell bash) \
--fish <($out/bin/fnm completions --shell fish) \
--zsh <($out/bin/fnm completions --shell zsh)
'';
meta = with lib; {
description = "Fast and simple Node.js version manager";
homepage = "https://github.com/Schniz/fnm";
license = licenses.gpl3Only;
maintainers = with maintainers; [ kidonng ];
};
}