nixpkgs/pkgs/tools/misc/shebangfix/default.nix
Marc Weber a89817cba8 added small script fixing the shebang (#!/bin/...) path.
It searches the PATH env variable for the same executable.

svn path=/nixpkgs/trunk/; revision=9667
2007-11-14 19:07:38 +00:00

21 lines
361 B
Nix

args:
args.stdenv.mkDerivation {
name = "shebangfix-0.0";
buildInputs = [args.perl];
file = ./shebangfix.pl;
phases = "buildPhase";
buildPhase = "
ensureDir \$out/bin
s=\$out/bin/shebangfix
cp \$file \$s
chmod +x \$s
perl \$s \$s
";
meta = { description = "replaces the #!executable with $#!correctpath/executable "; };
}