Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 41 lines 1.0 kB view raw
1{ 2 coreutils-prefixed, 3 lib, 4 makeWrapper, 5 stdenv, 6 fetchFromGitHub, 7}: 8 9stdenv.mkDerivation rec { 10 pname = "git-radar"; 11 version = "0.6"; 12 13 src = fetchFromGitHub { 14 owner = "michaeldfallen"; 15 repo = "git-radar"; 16 rev = "v${version}"; 17 sha256 = "0c3zp8s4w7m4s71qgwk1jyfc8yzw34f2hi43x1w437ypgabwg81j"; 18 }; 19 20 nativeBuildInputs = [ makeWrapper ]; 21 22 dontBuild = true; 23 24 installPhase = '' 25 mkdir -p $out/bin 26 cp git-radar fetch.sh prompt.bash prompt.zsh radar-base.sh $out 27 ln -s $out/git-radar $out/bin 28 ${lib.optionalString stdenv.hostPlatform.isDarwin '' 29 wrapProgram $out/git-radar --prefix PATH : ${lib.makeBinPath [ coreutils-prefixed ]} 30 ''} 31 ''; 32 33 meta = with lib; { 34 homepage = "https://github.com/michaeldfallen/git-radar"; 35 license = licenses.mit; 36 description = "Tool you can add to your prompt to provide at-a-glance information on your git repo"; 37 platforms = with platforms; linux ++ darwin; 38 maintainers = with maintainers; [ kamilchm ]; 39 mainProgram = "git-radar"; 40 }; 41}