diff options
author | Ludovic Courtès <ludo@gnu.org> | 2010-06-01 10:13:25 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2010-06-01 10:13:25 +0000 |
commit | 80e7412199465546d817b2dfa120a71f19778298 (patch) | |
tree | bda3477fa76ec3b9967f7e4ae7d4b341e0913234 /pkgs/development/tools/misc/sloccount | |
parent | 4036f1f614bf951baf610aa33e6c8de93dd7b246 (diff) | |
download | nixlib-80e7412199465546d817b2dfa120a71f19778298.tar nixlib-80e7412199465546d817b2dfa120a71f19778298.tar.gz nixlib-80e7412199465546d817b2dfa120a71f19778298.tar.bz2 nixlib-80e7412199465546d817b2dfa120a71f19778298.tar.lz nixlib-80e7412199465546d817b2dfa120a71f19778298.tar.xz nixlib-80e7412199465546d817b2dfa120a71f19778298.tar.zst nixlib-80e7412199465546d817b2dfa120a71f19778298.zip |
sloccount: Fix non-determinism due to timestamps.
svn path=/nixpkgs/trunk/; revision=22077
Diffstat (limited to 'pkgs/development/tools/misc/sloccount')
-rw-r--r-- | pkgs/development/tools/misc/sloccount/default.nix | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/pkgs/development/tools/misc/sloccount/default.nix b/pkgs/development/tools/misc/sloccount/default.nix index b25313f43558..906770e90665 100644 --- a/pkgs/development/tools/misc/sloccount/default.nix +++ b/pkgs/development/tools/misc/sloccount/default.nix @@ -10,10 +10,22 @@ stdenv.mkDerivation rec { buildInputs = [ perl ]; + # Make sure the Flex-generated files are newer than the `.l' files, so that + # Flex isn't needed to recompile them. patchPhase = '' for file in * do - substituteInPlace "$file" --replace "/usr/bin/perl" "${perl}/bin/perl" + if grep -q /usr/bin/perl "$file" + then + echo "patching \`$file'..." + substituteInPlace "$file" --replace \ + "/usr/bin/perl" "${perl}/bin/perl" + fi + done + + for file in *.l + do + touch "$(echo $file | sed -es'/\.l$/.c/g')" done ''; @@ -47,5 +59,8 @@ stdenv.mkDerivation rec { license = "GPLv2+"; homepage = http://www.dwheeler.com/sloccount/; + + maintainers = [ stdenv.lib.maintainers.ludo ]; + platforms = stdenv.lib.platforms.all; }; } |