* Added bash.

* Separated stdenv.fix and stdenv-nativetools.fix.

svn path=/nixpkgs/trunk/; revision=324
This commit is contained in:
Eelco Dolstra 2003-08-19 10:40:54 +00:00
parent 6ad771156c
commit 0dc6fd3204
8 changed files with 96 additions and 52 deletions

10
pkgs/bash/bash-build.sh Executable file
View File

@ -0,0 +1,10 @@
#! /bin/sh
. $stdenv/setup || exit 1
tar xvfz $src || exit 1
cd bash-* || exit 1
./configure --prefix=$out || exit 1
make || exit 1
make install || exit 1
(cd $out/bin; ln -s bash sh) || exit 1

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

@ -0,0 +1,13 @@
Package(
[ ("name", "bash-2.05b")
, ("build", Relative("bash/bash-build.sh"))
, ("src", Call(IncludeFix("fetchurl/fetchurl.fix"),
[ ("url", "ftp://ftp.nluug.nl/pub/gnu/bash/bash-2.05b.tar.gz")
, ("md5", "5238251b4926d778dfe162f6ce729733")
]))
, ("stdenv", IncludeFix("stdenv-linux/stdenv-nativetools.fix"))
]
)

View File

@ -6,3 +6,4 @@ export NIX_CC=@CC@
export NIX_CXX=@CXX@
export PATH=@PATH@
export SHELL=@SHELL@

View File

@ -4,27 +4,21 @@ export PATH=/bin:/usr/bin
mkdir $out || exit 1
if test "$nativeTools" == 1; then
p='$PATH:/usr/local/bin:/usr/bin:/bin'
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'
cc=/usr/bin/gcc
cxx=/usr/bin/g++
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'
cc=$gcc/bin/gcc
cxx=$gcc/bin/g++
fi
cc=$gcc/bin/gcc
cxx=$gcc/bin/g++
shell=$shell/bin/sh
echo "########## $p"
@ -34,4 +28,5 @@ sed \
-e s^@CXX\@^$cxx^g \
-e s^@BASEENV\@^$baseenv^g \
-e s^@PATH\@^$p^g \
-e s^@SHELL\@^$shell^g \
< $setup > $out/setup || exit 1

View File

@ -1,30 +0,0 @@
Function(["nativeTools"],
Package(
[ ("name", "stdenv-linux")
, ("build", Relative("stdenv-linux/stdenv-build.sh"))
, ("nativeTools", Var("nativeTools"))
, ("setup", Relative("stdenv-linux/setup.sh"))
, ("baseenv", IncludeFix("baseenv/baseenv.fix"))
, ("glibc", IncludeFix("glibc/glibc.fix"))
, ("tools", If(Var("nativeTools"),
[],
[ IncludeFix("coreutils/coreutils.fix")
, IncludeFix("gnused/gnused.fix")
, IncludeFix("gnugrep/gnugrep.fix")
, IncludeFix("gawk/gawk.fix")
, IncludeFix("gnutar/gnutar.fix")
, IncludeFix("diffutils/diffutils.fix")
, IncludeFix("gzip/gzip.fix")
, IncludeFix("bzip2/bzip2.fix")
, IncludeFix("gnumake/gnumake.fix")
, IncludeFix("binutils/binutils.fix")
]))
, ("gcc", If(Var("nativeTools"), "", IncludeFix("gcc/gcc.fix")))
]
)
)

View File

@ -0,0 +1,22 @@
#! /bin/sh
export PATH=/bin:/usr/bin
mkdir $out || exit 1
p='$PATH:/usr/local/bin:/usr/bin:/bin'
cc=/usr/bin/gcc
cxx=/usr/bin/g++
shell=/bin/sh
echo "########## $p"
sed \
-e s^@GLIBC\@^$glibc^g \
-e s^@CC\@^$cc^g \
-e s^@CXX\@^$cxx^g \
-e s^@BASEENV\@^$baseenv^g \
-e s^@PATH\@^$p^g \
-e s^@SHELL\@^$shell^g \
< $setup > $out/setup || exit 1

View File

@ -1 +1,9 @@
Call(IncludeFix("stdenv-linux/stdenv-generic.fix"), [("nativeTools", True)])
Package(
[ ("name", "stdenv-linux")
, ("build", Relative("stdenv-linux/stdenv-nativetools-build.sh"))
, ("setup", Relative("stdenv-linux/setup.sh"))
, ("baseenv", IncludeFix("baseenv/baseenv.fix"))
, ("glibc", IncludeFix("glibc/glibc.fix"))
]
)

View File

@ -1 +1,26 @@
Call(IncludeFix("stdenv-linux/stdenv-generic.fix"), [("nativeTools", False)])
Package(
[ ("name", "stdenv-linux")
, ("build", Relative("stdenv-linux/stdenv-build.sh"))
, ("setup", Relative("stdenv-linux/setup.sh"))
, ("baseenv", IncludeFix("baseenv/baseenv.fix"))
, ("glibc", IncludeFix("glibc/glibc.fix"))
, ("tools",
[ IncludeFix("coreutils/coreutils.fix")
, IncludeFix("gnused/gnused.fix")
, IncludeFix("gnugrep/gnugrep.fix")
, IncludeFix("gawk/gawk.fix")
, IncludeFix("gnutar/gnutar.fix")
, IncludeFix("diffutils/diffutils.fix")
, IncludeFix("gzip/gzip.fix")
, IncludeFix("bzip2/bzip2.fix")
, IncludeFix("gnumake/gnumake.fix")
, IncludeFix("binutils/binutils.fix")
, IncludeFix("bash/bash.fix")
])
, ("gcc", IncludeFix("gcc/gcc.fix"))
, ("shell", IncludeFix("bash/bash.fix"))
]
)