Merge pull request #61597 from xbreak/sloccount-wrap

sloccount: Wrap shell scripts
This commit is contained in:
Robin Gloster 2019-05-18 08:28:49 +00:00 committed by GitHub
commit e7103e63e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)";