at v192 833 B view raw
1{ stdenv, fetchurl, perl }: 2stdenv.mkDerivation rec { 3 inherit perl; 4 5 name = "checkbashisms"; 6 version = "2.0.0.2"; 7 8 src = fetchurl { 9 url = "mirror://sourceforge/project/checkbaskisms/${version}/${name}"; 10 sha256 = "1vm0yykkg58ja9ianfpm3mgrpah109gj33b41kl0jmmm11zip9jd"; 11 }; 12 13 meta = { 14 homepage = http://sourceforge.net/projects/checkbaskisms/; 15 description = "Check shell scripts for non-portable syntax"; 16 license = stdenv.lib.licenses.gpl2; 17 }; 18 19 # The link returns directly the script. No need for unpacking 20 unpackPhase = "true"; 21 22 installPhase = '' 23 mkdir -p $out/bin 24 cp $src $out/bin/checkbashisms 25 chmod 755 $out/bin/checkbashisms 26 ''; 27 28 # Makes sure to point to the proper perl version 29 fixupPhase = '' 30 sed -e "s#/usr/bin/perl#$perl/bin/perl#" -i $out/bin/checkbashisms 31 ''; 32}