mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 01:43:15 +00:00
add klibc
svn path=/nixpkgs/trunk/; revision=3723
This commit is contained in:
parent
42f3a42cee
commit
a816f506a2
11
pkgs/os-specific/linux/klibc/builder.sh
Normal file
11
pkgs/os-specific/linux/klibc/builder.sh
Normal 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
|
15
pkgs/os-specific/linux/klibc/default.nix
Normal file
15
pkgs/os-specific/linux/klibc/default.nix
Normal 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];
|
||||
}
|
34
pkgs/os-specific/linux/klibc/klibc-installpath.patch
Normal file
34
pkgs/os-specific/linux/klibc/klibc-installpath.patch
Normal 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
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user