diff options
author | Daniël de Kok <me@danieldk.eu> | 2020-08-10 17:07:08 +0200 |
---|---|---|
committer | Daniël de Kok <me@danieldk.eu> | 2020-08-10 17:07:08 +0200 |
commit | 5e8076a1f967888d80968d15d4e086cc1f738dfa (patch) | |
tree | 4c53cd5e2aaf53e9549b5d7873dfb7da180f3f39 /pkgs/development/tools/git-quick-stats | |
parent | e828343d7c2244e3366dfc1f7eab578ce791ec0d (diff) | |
download | nixpkgs-5e8076a1f967888d80968d15d4e086cc1f738dfa.tar nixpkgs-5e8076a1f967888d80968d15d4e086cc1f738dfa.tar.gz nixpkgs-5e8076a1f967888d80968d15d4e086cc1f738dfa.tar.bz2 nixpkgs-5e8076a1f967888d80968d15d4e086cc1f738dfa.tar.lz nixpkgs-5e8076a1f967888d80968d15d4e086cc1f738dfa.tar.xz nixpkgs-5e8076a1f967888d80968d15d4e086cc1f738dfa.tar.zst nixpkgs-5e8076a1f967888d80968d15d4e086cc1f738dfa.zip |
git-quick-stats: properly wrap
git-quick-stats was not properly wrapped, making it fail in pure and sandboxed environments.
Diffstat (limited to 'pkgs/development/tools/git-quick-stats')
-rw-r--r-- | pkgs/development/tools/git-quick-stats/default.nix | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/pkgs/development/tools/git-quick-stats/default.nix b/pkgs/development/tools/git-quick-stats/default.nix index 795c8b94cc4..0ceb6f566a3 100644 --- a/pkgs/development/tools/git-quick-stats/default.nix +++ b/pkgs/development/tools/git-quick-stats/default.nix @@ -1,14 +1,46 @@ -{ stdenv, fetchFromGitHub }: +{ stdenv +, fetchFromGitHub +, makeWrapper +, coreutils +, gawk +, git +, gnugrep +, ncurses +, utillinux +}: + stdenv.mkDerivation rec { pname = "git-quick-stats"; version = "2.1.4"; + src = fetchFromGitHub { repo = "git-quick-stats"; owner = "arzzen"; rev = version; sha256 = "0fg0fijghcz7hvbc9y8dfksz0qmsz700kc2mfb03y90kja99v68y"; }; - PREFIX = builtins.placeholder "out"; + + nativeBuildInputs = [ makeWrapper ]; + + installFlags = [ + "PREFIX=${builtins.placeholder "out"}" + ]; + + postInstall = + let + path = stdenv.lib.makeBinPath [ + coreutils + gawk + git + gnugrep + ncurses + utillinux + ]; + in + '' + wrapProgram $out/bin/git-quick-stats --suffix PATH : ${path} + ''; + meta = with stdenv.lib; { homepage = "https://github.com/arzzen/git-quick-stats"; description = "A simple and efficient way to access various statistics in git repository"; |