summary refs log tree commit diff
path: root/pkgs/tools/misc/shebangfix/default.nix
blob: 94ecc1e00f7b4002b49aa70f56d0d01aecae326f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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 "; };
}