diff options
author | Armijn Hemel <armijn@gpl-violations.org> | 2005-08-27 20:48:05 +0000 |
---|---|---|
committer | Armijn Hemel <armijn@gpl-violations.org> | 2005-08-27 20:48:05 +0000 |
commit | a816f506a23d2fcaf710888f9cb4fca33ec47ca1 (patch) | |
tree | b20a9f6f90fc3869a70cd7db23bcb93fd7d7c935 /pkgs/os-specific/linux/klibc | |
parent | 42f3a42ceeaa07b5ce7d6f9f28b1d6ad258e5c5a (diff) |
add klibc
svn path=/nixpkgs/trunk/; revision=3723
Diffstat (limited to 'pkgs/os-specific/linux/klibc')
-rw-r--r-- | pkgs/os-specific/linux/klibc/builder.sh | 11 | ||||
-rw-r--r-- | pkgs/os-specific/linux/klibc/default.nix | 15 | ||||
-rw-r--r-- | pkgs/os-specific/linux/klibc/klibc-installpath.patch | 34 |
3 files changed, 60 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/klibc/builder.sh b/pkgs/os-specific/linux/klibc/builder.sh new file mode 100644 index 0000000000000..a8daa6c09cf33 --- /dev/null +++ b/pkgs/os-specific/linux/klibc/builder.sh @@ -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 diff --git a/pkgs/os-specific/linux/klibc/default.nix b/pkgs/os-specific/linux/klibc/default.nix new file mode 100644 index 0000000000000..97d5996f3899a --- /dev/null +++ b/pkgs/os-specific/linux/klibc/default.nix @@ -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]; +} diff --git a/pkgs/os-specific/linux/klibc/klibc-installpath.patch b/pkgs/os-specific/linux/klibc/klibc-installpath.patch new file mode 100644 index 0000000000000..d85454d28272b --- /dev/null +++ b/pkgs/os-specific/linux/klibc/klibc-installpath.patch @@ -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 |