From 7d16a56b6f08bf73fb10385a3bfd25a4e9cd2970 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 11 Oct 2006 15:31:52 +0000 Subject: [PATCH] * Nix: no longer need a builder, use an external bzip2, removed nix-unstable. svn path=/nixpkgs/trunk/; revision=6702 --- pkgs/misc/nix-unstable/builder.sh | 8 ------- pkgs/misc/nix-unstable/default.nix | 23 ------------------ pkgs/misc/nix-unstable/nix-0.10pre5679.patch | 25 -------------------- pkgs/misc/nix/builder.sh | 8 ------- pkgs/misc/nix/default.nix | 15 +++++++----- pkgs/top-level/all-packages.nix | 15 +++--------- 6 files changed, 12 insertions(+), 82 deletions(-) delete mode 100644 pkgs/misc/nix-unstable/builder.sh delete mode 100644 pkgs/misc/nix-unstable/default.nix delete mode 100644 pkgs/misc/nix-unstable/nix-0.10pre5679.patch delete mode 100644 pkgs/misc/nix/builder.sh diff --git a/pkgs/misc/nix-unstable/builder.sh b/pkgs/misc/nix-unstable/builder.sh deleted file mode 100644 index 0decd4f50c38..000000000000 --- a/pkgs/misc/nix-unstable/builder.sh +++ /dev/null @@ -1,8 +0,0 @@ -source $stdenv/setup - -configureFlags="\ - --with-store-dir=$storeDir --localstatedir=$stateDir \ - --with-aterm=$aterm --with-bdb=$bdb \ - --disable-init-state" - -genericBuild diff --git a/pkgs/misc/nix-unstable/default.nix b/pkgs/misc/nix-unstable/default.nix deleted file mode 100644 index 42470a8d3bc4..000000000000 --- a/pkgs/misc/nix-unstable/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ stdenv, fetchurl, aterm, bdb, perl, curl -, storeDir ? "/nix/store" -, stateDir ? "/nix/var" -}: - -assert aterm != null && bdb != null && perl != null; -# assert bdb.version >= 4.2 -# assert aterm.version >= 2.0 - -stdenv.mkDerivation { - name = "nix-0.10pre6619"; - builder = ./builder.sh; - src = fetchurl { - url = http://nix.cs.uu.nl/dist/nix/nix-0.10pre6619/nix-0.10pre6619.tar.bz2; - md5 = "551a2ab48b87c0e7d95adc69a8f57e4e"; - }; - buildInputs = [aterm bdb perl curl]; - inherit storeDir stateDir aterm bdb; - - # uncomment if you want to be able to use nix-prefetch-url when NIX_ROOT - # is set. Not needed to build or install NixOS. - #patches = [./nix-0.10pre5679.patch]; -} diff --git a/pkgs/misc/nix-unstable/nix-0.10pre5679.patch b/pkgs/misc/nix-unstable/nix-0.10pre5679.patch deleted file mode 100644 index 4d72c1989416..000000000000 --- a/pkgs/misc/nix-unstable/nix-0.10pre5679.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -ruN nix-0.10pre5679/scripts/nix-prefetch-url.in nix-0.10pre5679.new/scripts/nix-prefetch-url.in ---- nix-0.10pre5679/scripts/nix-prefetch-url.in 2006-07-11 13:24:20.000000000 +0200 -+++ nix-0.10pre5679.new/scripts/nix-prefetch-url.in 2006-08-01 11:54:02.000000000 +0200 -@@ -39,10 +39,10 @@ - - tmpPath=/tmp/nix-prefetch-url-$$ # !!! security? - tmpFile=$tmpPath/$name -- mkdir $tmpPath -+ mkdir -p $NIX_ROOT/$tmpPath - - # Perform the download. -- @curl@ --fail --location --max-redirs 20 "$url" > $tmpFile -+ @curl@ --fail --location --max-redirs 20 "$url" > $NIX_ROOT/$tmpFile - - # Compute the hash. - hash=$(@bindir@/nix-hash --type "$hashType" $hashFormat --flat $tmpFile) -@@ -51,7 +51,7 @@ - # Add the downloaded file to the Nix store. - finalPath=$(@bindir@/nix-store --add-fixed "$hashType" $tmpFile) - -- if test -n "$tmpPath"; then rm -rf $tmpPath || true; fi -+ if test -n "$NIX_ROOT/$tmpPath"; then rm -rf $NIX_ROOT/$tmpPath || true; fi - - if test -n "$expHash" -a "$expHash" != "$hash"; then - echo "hash mismatch for URL \`$url'" diff --git a/pkgs/misc/nix/builder.sh b/pkgs/misc/nix/builder.sh deleted file mode 100644 index 0decd4f50c38..000000000000 --- a/pkgs/misc/nix/builder.sh +++ /dev/null @@ -1,8 +0,0 @@ -source $stdenv/setup - -configureFlags="\ - --with-store-dir=$storeDir --localstatedir=$stateDir \ - --with-aterm=$aterm --with-bdb=$bdb \ - --disable-init-state" - -genericBuild diff --git a/pkgs/misc/nix/default.nix b/pkgs/misc/nix/default.nix index 42d2ac8c2c0c..8f91b7419ebd 100644 --- a/pkgs/misc/nix/default.nix +++ b/pkgs/misc/nix/default.nix @@ -1,17 +1,20 @@ -{ stdenv, fetchurl, aterm, bdb, perl, curl +{ stdenv, fetchurl, aterm, db4, perl, curl, bzip2 , storeDir ? "/nix/store" , stateDir ? "/nix/var" }: -assert aterm != null && bdb != null && perl != null; - stdenv.mkDerivation { name = "nix-0.10.1"; - builder = ./builder.sh; + src = fetchurl { url = http://nix.cs.uu.nl/dist/nix/nix-0.10.1/nix-0.10.1.tar.bz2; md5 = "22dc0c024ca5bb477da0b38ba834dbf2"; }; - buildInputs = [aterm bdb perl curl]; - inherit storeDir stateDir aterm bdb; + + buildInputs = [perl curl]; + + configureFlags = " + --with-store-dir=${storeDir} --localstatedir=${stateDir} + --with-aterm=${aterm} --with-bdb=${db4} --with-bzip2=${bzip2} + --disable-init-state"; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b74e155c0347..f4e45aa62dfd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2784,25 +2784,16 @@ rec { }; nix = (import ../misc/nix) { - inherit fetchurl aterm perl curl; - bdb = db4; - stdenv = overrideGCC stdenv gcc34; + inherit fetchurl stdenv aterm db4 perl curl bzip2; }; + nixUnstable = nix; + nixStatic = (import ../misc/nix-static) { inherit fetchurl stdenv aterm perl curl autoconf automake libtool; bdb = db4; }; - nixUnstable = nix; - - /* - nixUnstable = (import ../misc/nix-unstable) { - inherit fetchurl stdenv aterm perl curl; - bdb = db4; - }; - */ - polytable = (import ../misc/tex/polytable) { inherit fetchurl stdenv tetex lazylist; };