* Added GNU tar.

* Some refactoring on stdenv-linux to prevent unnecessary rebuilds.

svn path=/nixpkgs/trunk/; revision=308
This commit is contained in:
Eelco Dolstra 2003-08-18 16:33:38 +00:00
parent 5cf73363ea
commit f6e0983d44
5 changed files with 47 additions and 8 deletions

9
pkgs/gnutar/gnutar-build.sh Executable file
View File

@ -0,0 +1,9 @@
#! /bin/sh
. $stdenv/setup || exit 1
tar xvfz $src || exit 1
cd tar-* || exit 1
./configure --prefix=$out || exit 1
make || exit 1
make install || exit 1

13
pkgs/gnutar/gnutar.fix Normal file
View File

@ -0,0 +1,13 @@
Package(
[ ("name", "gnutar-1.13.25")
, ("build", Relative("gnutar/gnutar-build.sh"))
, ("src", Call(IncludeFix("fetchurl/fetchurl.fix"),
[ ("url", "ftp://alpha.gnu.org/gnu/tar/tar-1.13.25.tar.gz")
, ("md5", "6ef8c906e81eee441f8335652670ac4a")
]))
, ("stdenv", IncludeFix("stdenv-linux/stdenv-nativetools.fix"))
]
)

View File

@ -3,8 +3,4 @@
export NIX_CFLAGS="-isystem @GLIBC@/include $NIX_CFLAGS"
export NIX_LDFLAGS="-L @GLIBC@/lib -Wl,-dynamic-linker,@GLIBC@/lib/ld-linux.so.2,-rpath,@GLIBC@/lib $NIX_LDFLAGS"
if test "@NATIVETOOLS@"; then
export PATH=$PATH:/usr/local/bin:/usr/bin:/bin
else
export PATH=@COREUTILS@/bin:$PATH
fi
export PATH=@PATH@

View File

@ -4,9 +4,26 @@ export PATH=/bin:/usr/bin
mkdir $out || exit 1
if test "$nativeTools" == 1; then
p='$PATH:/usr/local/bin:/usr/bin:/bin'
else
p=
first=1
for i in $tools; do
if test "$first" == 1; then
first=
else
p=$p:
fi
p=$p$i/bin
done
p=$p':$PATH'
fi
echo "########## $p"
sed \
-e s^@GLIBC\@^$glibc^g \
-e s^@BASEENV\@^$baseenv^g \
-e s^@NATIVETOOLS\@^$nativeTools^g \
-e s^@COREUTILS\@^$coreutils^g \
-e s^@PATH\@^$p^g \
< $setup > $out/setup || exit 1

View File

@ -10,7 +10,11 @@ Function(["nativeTools"],
, ("baseenv", IncludeFix("baseenv/baseenv.fix"))
, ("glibc", IncludeFix("glibc/glibc.fix"))
, ("coreutils", If(Var("nativeTools"), "", IncludeFix("coreutils/coreutils.fix")))
, ("tools", If(Var("nativeTools"),
[],
[ IncludeFix("coreutils/coreutils.fix")
, IncludeFix("gnutar/gnutar.fix")
]))
]
)
)