diff options
author | Robin Gloster <mail@glob.in> | 2016-04-18 13:00:40 +0000 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2016-04-18 13:49:22 +0000 |
commit | d020caa5b2eca90ea051403fbb4c52b99ee071b9 (patch) | |
tree | ba44ef1e784bca89e0df6b249956fd035b1d86e3 /pkgs/tools/package-management | |
parent | 3e68106afd95df012ddb548575f0133681687a90 (diff) | |
parent | 0729f606973870c03d21bb2f21b70d91216943ca (diff) | |
download | nixlib-d020caa5b2eca90ea051403fbb4c52b99ee071b9.tar nixlib-d020caa5b2eca90ea051403fbb4c52b99ee071b9.tar.gz nixlib-d020caa5b2eca90ea051403fbb4c52b99ee071b9.tar.bz2 nixlib-d020caa5b2eca90ea051403fbb4c52b99ee071b9.tar.lz nixlib-d020caa5b2eca90ea051403fbb4c52b99ee071b9.tar.xz nixlib-d020caa5b2eca90ea051403fbb4c52b99ee071b9.tar.zst nixlib-d020caa5b2eca90ea051403fbb4c52b99ee071b9.zip |
Merge remote-tracking branch 'upstream/master' into hardened-stdenv
Diffstat (limited to 'pkgs/tools/package-management')
5 files changed, 83 insertions, 7 deletions
diff --git a/pkgs/tools/package-management/checkinstall/default.nix b/pkgs/tools/package-management/checkinstall/default.nix index c47f1664cd6e..fea6ccedd34f 100644 --- a/pkgs/tools/package-management/checkinstall/default.nix +++ b/pkgs/tools/package-management/checkinstall/default.nix @@ -53,7 +53,7 @@ stdenv.mkDerivation { substituteInPlace checkinstallrc-dist --replace /usr/local $out substituteInPlace installwatch/create-localdecls \ - --replace /usr/include/unistd.h ${stdenv.glibc}/include/unistd.h + --replace /usr/include/unistd.h ${stdenv.glibc.dev}/include/unistd.h ''; postInstall = diff --git a/pkgs/tools/package-management/nix-prefetch-scripts/default.nix b/pkgs/tools/package-management/nix-prefetch-scripts/default.nix index e70659aff00f..aa109ab80fe3 100644 --- a/pkgs/tools/package-management/nix-prefetch-scripts/default.nix +++ b/pkgs/tools/package-management/nix-prefetch-scripts/default.nix @@ -36,8 +36,8 @@ in rec { nix-prefetch-cvs = mkPrefetchScript "cvs" ../../../build-support/fetchcvs/nix-prefetch-cvs [cvs]; nix-prefetch-git = mkPrefetchScript "git" ../../../build-support/fetchgit/nix-prefetch-git [git coreutils]; nix-prefetch-hg = mkPrefetchScript "hg" ../../../build-support/fetchhg/nix-prefetch-hg [mercurial]; - nix-prefetch-svn = mkPrefetchScript "svn" ../../../build-support/fetchsvn/nix-prefetch-svn [subversion]; - nix-prefetch-zip = mkPrefetchScript "zip" ../../../build-support/fetchzip/nix-prefetch-zip [unzip curl]; + nix-prefetch-svn = mkPrefetchScript "svn" ../../../build-support/fetchsvn/nix-prefetch-svn [subversion.out]; + nix-prefetch-zip = mkPrefetchScript "zip" ../../../build-support/fetchzip/nix-prefetch-zip [unzip curl.bin]; nix-prefetch-scripts = buildEnv { name = "nix-prefetch-scripts"; diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index 608fb31df783..16078906bc2b 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -9,7 +9,7 @@ let common = { name, src }: stdenv.mkDerivation rec { inherit name src; - outputs = [ "out" "doc" ]; + outputs = [ "out" "man" "doc" ]; nativeBuildInputs = [ perl pkgconfig ]; @@ -22,8 +22,8 @@ let # would end up using the wrong bzip2 when cross-compiling. # XXX: The right thing would be to reinstate `--with-bzip2' in Nix. postUnpack = - '' export CPATH="${bzip2}/include" - export LIBRARY_PATH="${bzip2}/lib" + '' export CPATH="${bzip2.dev}/include" + export LIBRARY_PATH="${bzip2.out}/lib" export CXXFLAGS="-Wno-error=reserved-user-defined-literal" ''; diff --git a/pkgs/tools/package-management/nix/unstable.nix b/pkgs/tools/package-management/nix/unstable.nix new file mode 100644 index 000000000000..88bd8f460375 --- /dev/null +++ b/pkgs/tools/package-management/nix/unstable.nix @@ -0,0 +1,76 @@ +{ lib, stdenv, fetchurl, perl, curl, bzip2, sqlite, openssl ? null +, pkgconfig, boehmgc, perlPackages, libsodium +, storeDir ? "/nix/store" +, stateDir ? "/nix/var" +}: + +stdenv.mkDerivation rec { + name = "nix-1.9pre4100_4bbcfaf"; + + src = fetchurl { + url = "http://hydra.nixos.org/build/21565942/download/4/${name}.tar.xz"; + sha256 = "1jcy0n8mi17k5vk89vammfh74lvsgnm4gjsk23cq1shspjnbbgxs"; + }; + + nativeBuildInputs = [ perl pkgconfig ]; + + buildInputs = [ curl openssl sqlite ] ++ lib.optional stdenv.isLinux libsodium; + + propagatedBuildInputs = [ boehmgc ]; + + # Note: bzip2 is not passed as a build input, because the unpack phase + # would end up using the wrong bzip2 when cross-compiling. + # XXX: The right thing would be to reinstate `--with-bzip2' in Nix. + postUnpack = + '' export CPATH="${bzip2.dev}/include" + export LIBRARY_PATH="${bzip2.out}/lib" + export CXXFLAGS="-Wno-error=reserved-user-defined-literal" + ''; + + configureFlags = + '' + --with-store-dir=${storeDir} --localstatedir=${stateDir} --sysconfdir=/etc + --with-dbi=${perlPackages.DBI}/${perl.libPrefix} + --with-dbd-sqlite=${perlPackages.DBDSQLite}/${perl.libPrefix} + --with-www-curl=${perlPackages.WWWCurl}/${perl.libPrefix} + --disable-init-state + --enable-gc + ''; + + makeFlags = "profiledir=$(out)/etc/profile.d"; + + installFlags = "sysconfdir=$(out)/etc"; + + doInstallCheck = true; + + crossAttrs = { + postUnpack = + '' export CPATH="${bzip2.crossDrv}/include" + export NIX_CROSS_LDFLAGS="-L${bzip2.crossDrv}/lib -rpath-link ${bzip2.crossDrv}/lib $NIX_CROSS_LDFLAGS" + ''; + + configureFlags = + '' + --with-store-dir=${storeDir} --localstatedir=${stateDir} + --with-dbi=${perlPackages.DBI}/${perl.libPrefix} + --with-dbd-sqlite=${perlPackages.DBDSQLite}/${perl.libPrefix} + --with-www-curl=${perlPackages.WWWCurl}/${perl.libPrefix} + --disable-init-state + --enable-gc + '' + stdenv.lib.optionalString ( + stdenv.cross ? nix && stdenv.cross.nix ? system + ) ''--with-system=${stdenv.cross.nix.system}''; + + doInstallCheck = false; + }; + + enableParallelBuilding = true; + + meta = { + description = "The Nix Deployment System"; + homepage = http://nixos.org/; + license = stdenv.lib.licenses.lgpl2Plus; + maintainers = [ stdenv.lib.maintainers.eelco ]; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/pkgs/tools/package-management/rpm/default.nix b/pkgs/tools/package-management/rpm/default.nix index 7b5281220fab..24346fb0eb70 100644 --- a/pkgs/tools/package-management/rpm/default.nix +++ b/pkgs/tools/package-management/rpm/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { # Note: we don't add elfutils to buildInputs, since it provides a # bad `ld' and other stuff. - NIX_CFLAGS_COMPILE = "-I${nspr}/include/nspr -I${nss}/include/nss -I${elfutils}/include"; + NIX_CFLAGS_COMPILE = "-I${nspr.dev}/include/nspr -I${nss.dev}/include/nss -I${elfutils}/include"; NIX_CFLAGS_LINK = "-L${elfutils}/lib"; |