mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
sloccount: Wrap shell scripts
This fixes the issue that when `sloccount` is invoked it would fail due to missing PATH to companion scripts.
This commit is contained in:
parent
3789eb8e3a
commit
d54ea3e42b
@ -1,4 +1,4 @@
|
||||
{ fetchurl, stdenv, perl }:
|
||||
{ fetchurl, stdenv, perl, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "sloccount-2.26";
|
||||
@ -8,6 +8,7 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0ayiwfjdh1946asah861ah9269s5xkc8p5fv1wnxs9znyaxs4zzs";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [ perl ];
|
||||
|
||||
# Make sure the Flex-generated files are newer than the `.l' files, so that
|
||||
@ -40,6 +41,13 @@ stdenv.mkDerivation rec {
|
||||
mkdir -p "$out/share/doc"
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
for w in "$out/bin"/*; do
|
||||
isScript "$w" || continue
|
||||
wrapProgram "$w" --prefix PATH : "$out/bin"
|
||||
done
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Set of tools for counting physical Source Lines of Code (SLOC)";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user