mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 08:31:59 +00:00
nixUnstable: Enable cross-compilation
Older nix versions likely aren't feasible due to the perl dependency.
This commit is contained in:
parent
94ab0da6b1
commit
5d6e229ec0
|
@ -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 = {
|
||||
|
|
Loading…
Reference in a new issue