diff --git a/overlays/android.nix b/overlays/android.nix index 6a2567c5c7..5cd37b34d0 100644 --- a/overlays/android.nix +++ b/overlays/android.nix @@ -25,8 +25,13 @@ final: prev: prev.lib.optionalAttrs prev.stdenv.hostPlatform.isAndroid ({ hardeningDisable = [ "fortify" "stackprotector" "format" ]; configureFlags = old.configureFlags ++ [ "--disable-shared" ]; }); + zlib = prev.zlib.override { shared = false; static = true; }; - + + numactl = prev.numactl.overrideAttrs (attrs: { + patches = (attrs.patches or []) ++ [ ./patches/numactl-2.0.14-no-librt.patch ]; + }); + }) // prev.lib.optionalAttrs prev.stdenv.targetPlatform.isAndroid ({ # we still need the shared libraries to link against on the platform. GHC # has been neutered to not even try loading shared libs and will use dynamic ones. diff --git a/overlays/patches/numactl-2.0.14-no-librt.patch b/overlays/patches/numactl-2.0.14-no-librt.patch new file mode 100644 index 0000000000..3e63c32e3b --- /dev/null +++ b/overlays/patches/numactl-2.0.14-no-librt.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile.am b/Makefile.am +index 44d0d76..1181ca5 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -34,7 +34,7 @@ migratepages_SOURCES = migratepages.c util.c + migratepages_LDADD = libnuma.la + + migspeed_SOURCES = migspeed.c util.c +-migspeed_LDADD = libnuma.la -lrt ++migspeed_LDADD = libnuma.la + + memhog_SOURCES = memhog.c util.c + memhog_LDADD = libnuma.la