at 23.11-beta 43 lines 1.0 kB view raw
1{ lib 2, stdenv 3, fetchFromGitHub 4, rustPlatform 5, installShellFiles 6, DiskArbitration 7, Foundation 8, Security 9}: 10 11rustPlatform.buildRustPackage rec { 12 pname = "fnm"; 13 version = "1.35.1"; 14 15 src = fetchFromGitHub { 16 owner = "Schniz"; 17 repo = pname; 18 rev = "v${version}"; 19 sha256 = "sha256-qRnxXh3m/peMNAR/EV+lkwDI+Z6komF8GGFyF5UDOFg="; 20 }; 21 22 nativeBuildInputs = [ installShellFiles ]; 23 24 buildInputs = lib.optionals stdenv.isDarwin [ DiskArbitration Foundation Security ]; 25 26 cargoHash = "sha256-//DCxAC8Jf7g8SkG4NfwkM0NyWUdASuw1g4COFIY0mU="; 27 28 doCheck = false; 29 30 postInstall = '' 31 installShellCompletion --cmd fnm \ 32 --bash <($out/bin/fnm completions --shell bash) \ 33 --fish <($out/bin/fnm completions --shell fish) \ 34 --zsh <($out/bin/fnm completions --shell zsh) 35 ''; 36 37 meta = with lib; { 38 description = "Fast and simple Node.js version manager"; 39 homepage = "https://github.com/Schniz/fnm"; 40 license = licenses.gpl3Only; 41 maintainers = with maintainers; [ kidonng ]; 42 }; 43}