diff options
author | Ben Gamari <ben@smart-cactus.org> | 2017-12-10 01:33:27 -0500 |
---|---|---|
committer | Will Dietz <w@wdtz.org> | 2018-02-13 09:44:58 -0600 |
commit | 5d6e229ec0dbd99d2aba37a31c65b2e9849e9eb5 (patch) | |
tree | 85998d9cdbea5e12aed88ad8effd30f91ba017f7 | |
parent | 94ab0da6b13d861f53da0e28a9bf30bbeca55d55 (diff) | |
download | nixlib-5d6e229ec0dbd99d2aba37a31c65b2e9849e9eb5.tar nixlib-5d6e229ec0dbd99d2aba37a31c65b2e9849e9eb5.tar.gz nixlib-5d6e229ec0dbd99d2aba37a31c65b2e9849e9eb5.tar.bz2 nixlib-5d6e229ec0dbd99d2aba37a31c65b2e9849e9eb5.tar.lz nixlib-5d6e229ec0dbd99d2aba37a31c65b2e9849e9eb5.tar.xz nixlib-5d6e229ec0dbd99d2aba37a31c65b2e9849e9eb5.tar.zst nixlib-5d6e229ec0dbd99d2aba37a31c65b2e9849e9eb5.zip |
nixUnstable: Enable cross-compilation
Older nix versions likely aren't feasible due to the perl dependency.
-rw-r--r-- | pkgs/tools/package-management/nix/default.nix | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index 91844bdb9dde..ce95f31112de 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -2,7 +2,7 @@ , pkgconfig, boehmgc, perlPackages, libsodium, aws-sdk-cpp, brotli , autoreconfHook, autoconf-archive, bison, flex, libxml2, libxslt, docbook5, docbook5_xsl , libseccomp, busybox-sandbox-shell -, hostPlatform +, hostPlatform, buildPlatform , storeDir ? "/nix/store" , stateDir ? "/nix/var" , confDir ? "/etc" @@ -52,35 +52,22 @@ let "--with-www-curl=${perlPackages.WWWCurl}/${perl.libPrefix}" ] ++ lib.optionals (is20 && stdenv.isLinux) [ "--with-sandbox-shell=${sh}/bin/busybox" - ]; + ] + ++ lib.optional ( + hostPlatform != buildPlatform && hostPlatform ? nix && hostPlatform.nix ? system + ) ''--with-system=${hostPlatform.nix.system}''; makeFlags = "profiledir=$(out)/etc/profile.d"; installFlags = "sysconfdir=$(out)/etc"; - doInstallCheck = true; + doInstallCheck = hostPlatform == buildPlatform; # socket path becomes too long otherwise preInstallCheck = lib.optional stdenv.isDarwin "export TMPDIR=/tmp"; separateDebugInfo = stdenv.isLinux; - crossAttrs = { - 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 ( - hostPlatform ? nix && hostPlatform.nix ? system - ) ''--with-system=${hostPlatform.nix.system}''; - - doInstallCheck = false; - }; - enableParallelBuilding = true; meta = { |