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
|
, pkgconfig, boehmgc, perlPackages, libsodium, aws-sdk-cpp, brotli
|
||||||
, autoreconfHook, autoconf-archive, bison, flex, libxml2, libxslt, docbook5, docbook5_xsl
|
, autoreconfHook, autoconf-archive, bison, flex, libxml2, libxslt, docbook5, docbook5_xsl
|
||||||
, libseccomp, busybox-sandbox-shell
|
, libseccomp, busybox-sandbox-shell
|
||||||
, hostPlatform
|
, hostPlatform, buildPlatform
|
||||||
, storeDir ? "/nix/store"
|
, storeDir ? "/nix/store"
|
||||||
, stateDir ? "/nix/var"
|
, stateDir ? "/nix/var"
|
||||||
, confDir ? "/etc"
|
, confDir ? "/etc"
|
||||||
|
@ -52,35 +52,22 @@ let
|
||||||
"--with-www-curl=${perlPackages.WWWCurl}/${perl.libPrefix}"
|
"--with-www-curl=${perlPackages.WWWCurl}/${perl.libPrefix}"
|
||||||
] ++ lib.optionals (is20 && stdenv.isLinux) [
|
] ++ lib.optionals (is20 && stdenv.isLinux) [
|
||||||
"--with-sandbox-shell=${sh}/bin/busybox"
|
"--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";
|
makeFlags = "profiledir=$(out)/etc/profile.d";
|
||||||
|
|
||||||
installFlags = "sysconfdir=$(out)/etc";
|
installFlags = "sysconfdir=$(out)/etc";
|
||||||
|
|
||||||
doInstallCheck = true;
|
doInstallCheck = hostPlatform == buildPlatform;
|
||||||
|
|
||||||
# socket path becomes too long otherwise
|
# socket path becomes too long otherwise
|
||||||
preInstallCheck = lib.optional stdenv.isDarwin "export TMPDIR=/tmp";
|
preInstallCheck = lib.optional stdenv.isDarwin "export TMPDIR=/tmp";
|
||||||
|
|
||||||
separateDebugInfo = stdenv.isLinux;
|
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;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
Loading…
Reference in New Issue