Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
41 lines
1000 B
Nix
41 lines
1000 B
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
rustPlatform,
|
|
installShellFiles,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "fnm";
|
|
version = "1.38.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Schniz";
|
|
repo = "fnm";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-WW+jWaClDn78Fw/xj6WvnEUlBI99HA5hQFUpwsYKmbI=";
|
|
};
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
cargoHash = "sha256-mxYTV3kNetIHB8XcvFdqp7t78E9EzMdMgD4ENIAYyec=";
|
|
|
|
doCheck = false;
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
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 = {
|
|
description = "Fast and simple Node.js version manager";
|
|
mainProgram = "fnm";
|
|
homepage = "https://github.com/Schniz/fnm";
|
|
license = lib.licenses.gpl3Only;
|
|
maintainers = with lib.maintainers; [ kidonng ];
|
|
};
|
|
}
|