lol
at 22.05-pre 35 lines 966 B view raw
1{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, Security }: 2 3rustPlatform.buildRustPackage rec { 4 pname = "fnm"; 5 version = "1.27.0"; 6 7 src = fetchFromGitHub { 8 owner = "Schniz"; 9 repo = pname; 10 rev = "v${version}"; 11 sha256 = "sha256-4qnisgWhdAWZda8iy9nkph7//bVKJuUeEDS1GaAx+FQ="; 12 }; 13 14 nativeBuildInputs = [ installShellFiles ]; 15 16 buildInputs = lib.optionals stdenv.isDarwin [ Security ]; 17 18 cargoSha256 = "sha256-f3wzuXH2ByXHHOq3zLaMtYm2HJ4BzmZe2e6DQ3V7qVo="; 19 20 doCheck = false; 21 22 postInstall = '' 23 installShellCompletion --cmd fnm \ 24 --bash <($out/bin/fnm completions --shell bash) \ 25 --fish <($out/bin/fnm completions --shell fish) \ 26 --zsh <($out/bin/fnm completions --shell zsh) 27 ''; 28 29 meta = with lib; { 30 description = "Fast and simple Node.js version manager"; 31 homepage = "https://github.com/Schniz/fnm"; 32 license = licenses.gpl3Only; 33 maintainers = with maintainers; [ kidonng ]; 34 }; 35}