nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

git-quick-stats: properly wrap

git-quick-stats was not properly wrapped, making it fail in pure
and sandboxed environments.

+34 -2
+34 -2
pkgs/development/tools/git-quick-stats/default.nix
··· 1 - { stdenv, fetchFromGitHub }: 1 + { stdenv 2 + , fetchFromGitHub 3 + , makeWrapper 4 + , coreutils 5 + , gawk 6 + , git 7 + , gnugrep 8 + , ncurses 9 + , utillinux 10 + }: 11 + 2 12 stdenv.mkDerivation rec { 3 13 pname = "git-quick-stats"; 4 14 version = "2.1.4"; 15 + 5 16 src = fetchFromGitHub { 6 17 repo = "git-quick-stats"; 7 18 owner = "arzzen"; 8 19 rev = version; 9 20 sha256 = "0fg0fijghcz7hvbc9y8dfksz0qmsz700kc2mfb03y90kja99v68y"; 10 21 }; 11 - PREFIX = builtins.placeholder "out"; 22 + 23 + nativeBuildInputs = [ makeWrapper ]; 24 + 25 + installFlags = [ 26 + "PREFIX=${builtins.placeholder "out"}" 27 + ]; 28 + 29 + postInstall = 30 + let 31 + path = stdenv.lib.makeBinPath [ 32 + coreutils 33 + gawk 34 + git 35 + gnugrep 36 + ncurses 37 + utillinux 38 + ]; 39 + in 40 + '' 41 + wrapProgram $out/bin/git-quick-stats --suffix PATH : ${path} 42 + ''; 43 + 12 44 meta = with stdenv.lib; { 13 45 homepage = "https://github.com/arzzen/git-quick-stats"; 14 46 description = "A simple and efficient way to access various statistics in git repository";