From b131d474c7793a8cf292a49f3ff9085c10af2e60 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 18 Oct 2006 11:25:10 +0000 Subject: [PATCH] * dietlibc: symlink "lib" to "lib-*", and symlink "crt1.o" to "start.o" to make it easier to use dietlibc as a drop-in replacement for glibc. svn path=/nixpkgs/trunk/; revision=6759 --- pkgs/os-specific/linux/dietlibc/builder.sh | 13 +++++++------ pkgs/os-specific/linux/dietlibc/default.nix | 3 ++- .../linux/dietlibc/dietlibc-install.patch | 10 ---------- 3 files changed, 9 insertions(+), 17 deletions(-) delete mode 100644 pkgs/os-specific/linux/dietlibc/dietlibc-install.patch diff --git a/pkgs/os-specific/linux/dietlibc/builder.sh b/pkgs/os-specific/linux/dietlibc/builder.sh index 7947969f5f38..66c3b92f5303 100644 --- a/pkgs/os-specific/linux/dietlibc/builder.sh +++ b/pkgs/os-specific/linux/dietlibc/builder.sh @@ -1,11 +1,12 @@ source $stdenv/setup -preBuild() { - kernelhash=$(ls $kernel/lib/modules) - echo $kernelhash - ln -s $kernel/lib/modules/$kernelhash/build linux +makeFlags="prefix=$out" +installFlags="prefix=$out" + +postInstall=postInstall +postInstall() { + (cd $out && ln -s lib-* lib) + (cd $out/lib && ln -s start.o crt1.o) } -preBuild=preBuild - genericBuild diff --git a/pkgs/os-specific/linux/dietlibc/default.nix b/pkgs/os-specific/linux/dietlibc/default.nix index ddd4010b5a10..3b1bea26a5a4 100644 --- a/pkgs/os-specific/linux/dietlibc/default.nix +++ b/pkgs/os-specific/linux/dietlibc/default.nix @@ -8,5 +8,6 @@ stdenv.mkDerivation { url = http://nix.cs.uu.nl/dist/tarballs/dietlibc-0.30.tar.bz2; md5 = "2465d652fff6f1fad3da3b98e60e83c9"; }; - patches = [./dietlibc-install.patch]; + builder = ./builder.sh; +# patches = [./dietlibc-install.patch]; } diff --git a/pkgs/os-specific/linux/dietlibc/dietlibc-install.patch b/pkgs/os-specific/linux/dietlibc/dietlibc-install.patch deleted file mode 100644 index d8a428c3c308..000000000000 --- a/pkgs/os-specific/linux/dietlibc/dietlibc-install.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff -ruN dietlibc-0.29/Makefile dietlibc-0.29.new/Makefile ---- dietlibc-0.29/Makefile 2005-05-18 16:38:55.000000000 +0200 -+++ dietlibc-0.29.new/Makefile 2005-08-28 01:02:50.000000000 +0200 -@@ -1,5 +1,5 @@ - INSTALL=install --prefix?=/opt/diet -+prefix?=${out} - # Set the following to install to a different root - #DESTDIR=/tmp/fefix - # Use "make DEBUG=1" to compile a debug version.