about summary refs log tree commit diff
path: root/pkgs/tools/misc/shebangfix/default.nix
blob: 082b04b95d783888cfc5b4250f063a8b942c91f6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ stdenv, perl }:

stdenv.mkDerivation {
  name = "shebangfix-0.0";

  buildInputs = [perl];

  file = ./shebangfix.pl;

  phases = "buildPhase";

  buildPhase = ''
    ensureDir $out/bin
    s=$out/bin/shebangfix
    cp $file $s
    chmod +wx $s
    ls -l $s
    perl $s $s
  '';

  meta = { description = "replaces the #!executable with $#!correctpath/executable "; };
}