2011-02-11 12:45:19 +00:00
|
|
|
{ stdenv, fetchurl, perl, curl, bzip2, sqlite, openssl ? null
|
2011-04-15 14:39:44 +01:00
|
|
|
, pkgconfig, boehmgc, perlPackages
|
2006-11-17 12:49:46 +00:00
|
|
|
, storeDir ? "/nix/store"
|
|
|
|
, stateDir ? "/nix/var"
|
|
|
|
}:
|
|
|
|
|
2012-03-01 20:18:33 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2012-03-09 19:57:33 +00:00
|
|
|
name = "nix-1.0pre2614_005d1e4";
|
2010-03-11 10:51:53 +00:00
|
|
|
|
2007-08-14 17:41:41 +01:00
|
|
|
src = fetchurl {
|
2012-03-09 19:57:33 +00:00
|
|
|
url = "http://hydra.nixos.org/build/2230618/download/4/${name}.tar.bz2";
|
|
|
|
sha256 = "47a4ff811f0d23d1c0176bc1fbb828edf16906568b0cbf5942b912ed2d2c1b44";
|
2007-08-14 17:41:41 +01:00
|
|
|
};
|
2007-08-11 11:34:07 +01:00
|
|
|
|
2010-11-30 18:32:23 +00:00
|
|
|
buildNativeInputs = [ perl pkgconfig ];
|
|
|
|
buildInputs = [ curl openssl boehmgc ];
|
2006-11-17 12:49:46 +00:00
|
|
|
|
2010-03-16 12:46:12 +00:00
|
|
|
configureFlags =
|
|
|
|
''
|
|
|
|
--with-store-dir=${storeDir} --localstatedir=${stateDir}
|
2011-02-11 12:45:19 +00:00
|
|
|
--with-bzip2=${bzip2} --with-sqlite=${sqlite}
|
2011-04-15 14:39:44 +01:00
|
|
|
--with-dbi=${perlPackages.DBI}/lib/perl5/site_perl
|
|
|
|
--with-dbd-sqlite=${perlPackages.DBDSQLite}/lib/perl5/site_perl
|
2010-03-16 12:46:12 +00:00
|
|
|
--disable-init-state
|
2010-11-30 18:32:23 +00:00
|
|
|
--enable-gc
|
2010-05-14 09:57:16 +01:00
|
|
|
CFLAGS=-O3 CXXFLAGS=-O3
|
2010-03-16 12:46:12 +00:00
|
|
|
'';
|
2006-11-17 12:49:46 +00:00
|
|
|
|
2010-05-19 16:13:46 +01:00
|
|
|
crossAttrs = {
|
|
|
|
configureFlags =
|
|
|
|
''
|
|
|
|
--with-store-dir=${storeDir} --localstatedir=${stateDir}
|
2011-02-11 12:45:19 +00:00
|
|
|
--with-bzip2=${bzip2.hostDrv} --with-sqlite=${sqlite.hostDrv}
|
2011-11-16 20:21:58 +00:00
|
|
|
--enable-gc
|
|
|
|
--with-dbi=${perlPackages.DBI}/lib/perl5/site_perl
|
|
|
|
--with-dbd-sqlite=${perlPackages.DBDSQLite}/lib/perl5/site_perl
|
2010-05-19 16:13:46 +01:00
|
|
|
--disable-init-state
|
|
|
|
CFLAGS=-O3 CXXFLAGS=-O3
|
2011-11-16 21:04:02 +00:00
|
|
|
'' + stdenv.lib.optionalString (
|
|
|
|
stdenv.cross ? nix && stdenv.cross.nix ? system
|
|
|
|
) ''--with-system=${stdenv.cross.nix.system}'';
|
2010-05-19 16:13:46 +01:00
|
|
|
doCheck = false;
|
|
|
|
};
|
|
|
|
|
2011-04-15 14:39:44 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2009-01-29 16:08:03 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2012-03-01 20:18:33 +00:00
|
|
|
# Hack to get the check to succeed on Darwin.
|
|
|
|
phases = stdenv.lib.optionalString stdenv.isDarwin
|
|
|
|
"$prePhases unpackPhase patchPhase $preConfigurePhases configurePhase $preBuildPhases buildPhase $preInstallPhases installPhase checkPhase fixupPhase $preDistPhases distPhase $postPhases";
|
|
|
|
|
2006-11-17 12:49:46 +00:00
|
|
|
meta = {
|
|
|
|
description = "The Nix Deployment System";
|
2008-06-24 10:39:19 +01:00
|
|
|
homepage = http://nixos.org/;
|
2010-03-11 10:51:53 +00:00
|
|
|
license = "LGPLv2+";
|
2006-11-17 12:49:46 +00:00
|
|
|
};
|
2012-03-01 20:18:33 +00:00
|
|
|
}
|