Remove obsolete shebangfix script

This commit is contained in:
Eelco Dolstra 2015-01-07 15:28:38 +01:00
parent 4e382bce7e
commit 71aef59300
4 changed files with 4 additions and 67 deletions

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, perl, shebangfix }:
{ stdenv, fetchurl, perl }:
# The homepage says this script is mature..
stdenv.mkDerivation {
@ -9,19 +9,15 @@ stdenv.mkDerivation {
sha256 = "0dpbxf3kdvpihz9cisx6wi3zzd0cnifaqvjxavrbwm4k4sz1qamp";
};
phases = "unpackPhase installPhase";
buildInputs = [ perl shebangfix ];
buildInputs = [ perl ];
installPhase = ''
mkdir -p $out/bin;
shebangfix mysql2psql
chmod +x mysql2psql
mkdir -p $out/bin
mv {,$out/bin/}mysql2psql
'';
meta = {
description = "converts mysql dump files to psql loadable files ";
description = "Convert MySQL dump files to PostgreSQL-loadable files";
homepage = http://pgfoundry.org/projects/mysql2pgsql/;
license = stdenv.lib.licenses.bsdOriginal;
};

View file

@ -1,22 +0,0 @@
{ stdenv, perl }:
stdenv.mkDerivation {
name = "shebangfix-0.0";
buildInputs = [perl];
file = ./shebangfix.pl;
phases = "buildPhase";
buildPhase = ''
mkdir -p $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 "; };
}

View file

@ -1,35 +0,0 @@
#!/bin/perl
use warnings;
use strict;
#usage PATH=< : separated path list> perl <this script> file1 file2
print "TODO fix space trouble. This script won't work if your paths contain spaces";
sub findInPath{
my $file = shift(@_);
foreach (split(/:/, $ENV{'PATH'})){
my $f = "$_/$file";
if (-x "$f"){
return $f;
}
}
print "unable to find $file in on of ".$ENV{'PATH'};
exit 1
}
foreach (@ARGV)
{
my $file = $_;
open(FILE, $file);
my $content = do { local $/; <FILE> };
close(FILE);
(my $name = $content) =~ /^#![^ ]*\/([^ \n\r]*)/;
my $fullpath = ($1 eq 'sh') ? "/bin/sh" : findInPath($1);
$content =~ s/^#![^ \n\r]*/#!$fullpath/;
open(FILE, ">$file");
print FILE $content;
close($file);
}

View file

@ -2413,8 +2413,6 @@ let
shotwell = callPackage ../applications/graphics/shotwell { };
shebangfix = callPackage ../tools/misc/shebangfix { };
shellinabox = callPackage ../servers/shellinabox { };
siege = callPackage ../tools/networking/siege {};