Remove obsolete shebangfix script
This commit is contained in:
parent
4e382bce7e
commit
71aef59300
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, perl, shebangfix }:
|
{ stdenv, fetchurl, perl }:
|
||||||
|
|
||||||
# The homepage says this script is mature..
|
# The homepage says this script is mature..
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
@ -9,19 +9,15 @@ stdenv.mkDerivation {
|
|||||||
sha256 = "0dpbxf3kdvpihz9cisx6wi3zzd0cnifaqvjxavrbwm4k4sz1qamp";
|
sha256 = "0dpbxf3kdvpihz9cisx6wi3zzd0cnifaqvjxavrbwm4k4sz1qamp";
|
||||||
};
|
};
|
||||||
|
|
||||||
phases = "unpackPhase installPhase";
|
buildInputs = [ perl ];
|
||||||
|
|
||||||
buildInputs = [ perl shebangfix ];
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin;
|
mkdir -p $out/bin
|
||||||
shebangfix mysql2psql
|
|
||||||
chmod +x mysql2psql
|
|
||||||
mv {,$out/bin/}mysql2psql
|
mv {,$out/bin/}mysql2psql
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
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/;
|
homepage = http://pgfoundry.org/projects/mysql2pgsql/;
|
||||||
license = stdenv.lib.licenses.bsdOriginal;
|
license = stdenv.lib.licenses.bsdOriginal;
|
||||||
};
|
};
|
||||||
|
@ -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 "; };
|
|
||||||
}
|
|
@ -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);
|
|
||||||
}
|
|
@ -2413,8 +2413,6 @@ let
|
|||||||
|
|
||||||
shotwell = callPackage ../applications/graphics/shotwell { };
|
shotwell = callPackage ../applications/graphics/shotwell { };
|
||||||
|
|
||||||
shebangfix = callPackage ../tools/misc/shebangfix { };
|
|
||||||
|
|
||||||
shellinabox = callPackage ../servers/shellinabox { };
|
shellinabox = callPackage ../servers/shellinabox { };
|
||||||
|
|
||||||
siege = callPackage ../tools/networking/siege {};
|
siege = callPackage ../tools/networking/siege {};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user