Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 70 lines 1.6 kB view raw
1{ 2 stdenvNoCC, 3 lib, 4 fetchFromGitHub, 5 installShellFiles, 6 nix-update-script, 7}: 8 9stdenvNoCC.mkDerivation (finalAttrs: { 10 pname = "zinit"; 11 version = "3.14.0"; 12 13 src = fetchFromGitHub { 14 owner = "zdharma-continuum"; 15 repo = "zinit"; 16 tag = "v${finalAttrs.version}"; 17 hash = "sha256-cBMGmFrveBes30aCSLMBO8WrtoPZeMNjcEQoQEzBNvM="; 18 }; 19 20 outputs = [ 21 "out" 22 "man" 23 ]; 24 25 strictDeps = true; 26 27 nativeBuildInputs = [ installShellFiles ]; 28 29 installPhase = '' 30 runHook preInstall 31 32 # Source files 33 mkdir -p $out/share/zinit 34 install -m0644 zinit{,-side,-install,-autoload}.zsh _zinit $out/share/zinit 35 install -m0755 share/git-process-output.zsh $out/share/zinit 36 37 # Autocompletion 38 installShellCompletion --zsh _zinit 39 40 # Manpage 41 mkdir -p ${placeholder "man"}/share/man/man{1..9} 42 installManPage doc/zinit.1 43 44 runHook postInstall 45 ''; 46 47 postFixup = '' 48 substituteInPlace $out/share/zinit/zinit.zsh \ 49 --replace-fail zinit.1 zinit.1.gz \ 50 --replace-fail "\''${ZINIT[BIN_DIR]}/doc" ${placeholder "man"}/share/man/man1 \ 51 --replace-fail "ZINIT[MAN_DIR]:=\''${ZPFX}/man" "ZINIT[MAN_DIR]:=${placeholder "man"}/share/man" 52 ''; 53 54 #TODO: output doc through zshelldoc 55 56 passthru = { 57 updateScript = nix-update-script { }; 58 }; 59 60 meta = { 61 homepage = "https://github.com/zdharma-continuum/zinit"; 62 description = "Flexible zsh plugin manager"; 63 license = lib.licenses.mit; 64 maintainers = with lib.maintainers; [ 65 pasqui23 66 sei40kr 67 moraxyc 68 ]; 69 }; 70})