add klibc

svn path=/nixpkgs/trunk/; revision=3723
This commit is contained in:
Armijn Hemel 2005-08-27 20:48:05 +00:00
parent 42f3a42cee
commit a816f506a2
4 changed files with 71 additions and 3 deletions

View File

@ -0,0 +1,11 @@
. $stdenv/setup
preBuild() {
kernelhash=$(ls $kernel/lib/modules)
echo $kernelhash
ln -s $kernel/lib/modules/$kernelhash/build linux
}
preBuild=preBuild
genericBuild

View File

@ -0,0 +1,15 @@
{stdenv, fetchurl, kernel, perl, bison, flexWrapper}:
assert stdenv.system == "i686-linux";
stdenv.mkDerivation {
name = "klibc-1.0";
builder = ./builder.sh;
src = fetchurl {
url = ftp://ftp.kernel.org/pub/linux/libs/klibc/klibc-1.0.tar.bz2;
md5 = "daaa233fb7905cbe110896fcad9bec7f";
};
inherit kernel;
buildInputs = [perl bison flexWrapper];
patches = [./klibc-installpath.patch];
}

View File

@ -0,0 +1,34 @@
diff -ruN klibc-1.0/Makefile klibc-1.0.new/Makefile
--- klibc-1.0/Makefile 2005-03-07 19:17:15.000000000 +0100
+++ klibc-1.0.new/Makefile 2005-08-27 22:40:12.000000000 +0200
@@ -61,7 +61,8 @@
mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(CROSS)include/$$d ; \
for r in $(KRNLSRC)/include $(KRNLOBJ)/include $(KRNLOBJ)/include2 ; do \
[ ! -d $$r/$$d ] || \
- cp -rfL $$r/$$d/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/$$d/. ; \
+ (chmod -R +w $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/$$d/.; \
+ cp -rfL $$r/$$d/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/$$d/. ); \
done ; \
done
cd $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include && ln -sf asm-$(ARCH) asm
diff -ruN klibc-1.0/MCONFIG klibc-1.0.new/MCONFIG
--- klibc-1.0/MCONFIG 2005-03-06 20:35:22.000000000 +0100
+++ klibc-1.0.new/MCONFIG 2005-08-27 22:43:06.000000000 +0200
@@ -12,7 +12,7 @@
KCROSS ?= $(CROSS)
# Location for installation
-prefix = /usr
+prefix = $(out)
bindir = $(prefix)/bin
libdir = $(prefix)/lib
mandir = $(prefix)/man
@@ -70,7 +70,7 @@
# THIS MUST BE AN ABSOLUTE PATH WITH NO FINAL SLASH.
# Leave this empty to make it the root.
#
-SHLIBDIR = /lib
+SHLIBDIR = $(out)/lib
# Enable this to make perror/strerror return real error messages
# This makes klibc.so and any static binary which uses these functions

View File

@ -360,6 +360,10 @@ rec {
inherit fetchurl stdenv yacc;
};
flexWrapper = (import ../development/tools/parsing/flex-wrapper) {
inherit stdenv flex ;
};
flexnew = (import ../development/tools/parsing/flex/flex-new.nix) {
inherit fetchurl stdenv yacc;
m4 = gnum4;
@ -1097,6 +1101,10 @@ rec {
inherit fetchurl stdenv perl;
};
klibc = (import ../os-specific/linux/klibc) {
inherit fetchurl stdenv kernel perl bison flexWrapper;
};
mingetty = (import ../os-specific/linux/mingetty) {
inherit fetchurl stdenv;
};
@ -1105,9 +1113,9 @@ rec {
inherit stdenv mingetty shadowutils;
};
nfsUtils = (import ../os-specific/linux/nfs-utils) {
inherit fetchurl stdenv;
};
#nfsUtils = (import ../os-specific/linux/nfs-utils) {
# inherit fetchurl stdenv;
#};
alsaLib = (import ../os-specific/linux/alsa/library) {
inherit fetchurl stdenv;