From 2b7111af5affee03c4c45ce0644bb69f9d9f93fd Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Wed, 18 Nov 2020 12:36:27 +0100 Subject: [PATCH] overlay: autoreconf some packages Manually add the autoreconfHook to some packages that build only static libraries otherwise. Adding every library with this problem is not a practical solution but in the short term it is useful for finding other problems. --- overlay/default.nix | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/overlay/default.nix b/overlay/default.nix index 45ef041..04c9679 100644 --- a/overlay/default.nix +++ b/overlay/default.nix @@ -19,6 +19,18 @@ let overrideTargetAttrs drv (attrs: { patches = attrs.patches or [ ] ++ [ patch ]; }); + nullForHost = pkg: if hostPlatform.isGenode then null else pkg; + + reconfForHost = pkg: + if hostPlatform.isGenode then + pkg.overrideAttrs (attrs: { + nativeBuildInputs = attrs.nativeBuildInputs or [ ] + ++ [ final.autoreconfHook final.gnum4 ]; + M4 = "${final.buildPackages.gnum4}/bin/m4"; + }) + else + pkg; + in { bash = overrideTargetAttrs bash (attrs: { @@ -32,6 +44,8 @@ in { nativeBuildInputs = [ final.updateAutotoolsGnuConfigScriptsHook ]; }); + c-ares = reconfForHost c-ares; + cmake = overrideTargetAttrs cmake (attrs: { postInstall = with stdenv; '' local MODULE="$out/share/cmake-${ @@ -81,6 +95,10 @@ in { else prev.libcCrossChooser name; + libev = reconfForHost libev; + + libssh2 = reconfForHost libssh2; + libsodium = overrideHostAttrs libsodium (attrs: { patches = (attrs.patches or [ ]) ++ [ ./libsodium/genode.patch ]; }); @@ -125,7 +143,7 @@ in { "rm $out/bin/c_rehash"; # eliminate the perl runtime dependency }); - popt = if hostPlatform.isGenode then null else popt; # libtool problems + popt = nullForHost popt; # libtool problems rsync = overrideHost rsync { enableACLs = false; };