Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 52 lines 1.1 kB view raw
1{ 2 lib, 3 stdenvNoCC, 4 fetchFromGitHub, 5 installShellFiles, 6 ronn, 7 nix-update-script, 8}: 9stdenvNoCC.mkDerivation rec { 10 pname = "git-identity"; 11 version = "1.1.1"; 12 13 src = fetchFromGitHub { 14 owner = "madx"; 15 repo = "git-identity"; 16 tag = "v${version}"; 17 hash = "sha256-u4lIW0bntaKrVUwodXZ8ZwWxSZtLuhVSUAbIj8jjcLw="; 18 }; 19 20 nativeBuildInputs = [ 21 installShellFiles 22 ronn 23 ]; 24 25 buildPhase = '' 26 runHook preBuild 27 ronn --roff git-identity.1.ronn 28 runHook postBuild 29 ''; 30 31 installPhase = '' 32 runHook preInstall 33 mkdir -p $out/bin 34 cp git-identity $out/bin/git-identity 35 installManPage git-identity.1 36 installShellCompletion --cmd git-identity \ 37 --bash git-identity.bash-completion \ 38 --zsh git-identity.zsh-completion 39 runHook postInstall 40 ''; 41 42 passthru.updateScript = nix-update-script { }; 43 44 meta = { 45 description = "Manage your identity in Git"; 46 mainProgram = "git-identity"; 47 homepage = "https://github.com/madx/git-identity"; 48 license = lib.licenses.wtfpl; 49 maintainers = with lib.maintainers; [ mynacol ]; 50 platforms = lib.platforms.all; 51 }; 52}