aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.nix3
-rw-r--r--standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/Makefile2
2 files changed, 4 insertions, 1 deletions
diff --git a/flake.nix b/flake.nix
index 7265e2f..4cba1fd 100644
--- a/flake.nix
+++ b/flake.nix
@@ -66,6 +66,9 @@
libtomcrypt = pkgs.libtomcrypt.overrideAttrs (final: prev: {
makefile = "makefile.unix";
});
+ nettle = pkgs.nettle.overrideAttrs (final: prev: {
+ configureFlags = ( prev.configureFlags or [] ) ++ [ "--enable-static" ];
+ });
cryptopp = pkgs.cryptopp.override { enableStatic = true; };
libressl = pkgs.libressl.overrideAttrs (_old: rec {
# devLibPath = pkgs.lib.makeLibraryPath [ pkgs.libressl.dev ];
diff --git a/standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/Makefile b/standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/Makefile
index fa9e3ed..845915c 100644
--- a/standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/Makefile
+++ b/standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/Makefile
@@ -172,7 +172,7 @@ ippcp.o: ippcp.c
nettle: nettle_provider.so
nettle_provider.so: nettle.o c_utils.o | lib_timing.so lib_csignals.so
- $(CC) $(LFLAGS) -o $@ -Wl,-rpath,'$$ORIGIN/lib' $^ -L. $(shell pkg-config --libs nettle) -l:lib_timing.so -l:lib_csignals.so $(shell pkg-config --libs hogweed) -lgmp
+ $(CC) $(LFLAGS) -o $@ -Wl,-rpath,'$$ORIGIN/lib' $^ -L. -Wl,-Bstatic $(shell pkg-config --libs nettle) -Wl,-Bdynamic -l:lib_timing.so -l:lib_csignals.so $(shell pkg-config --libs hogweed) -lgmp
nettle.o: nettle.c
$(CC) $(shell pkg-config --cflags nettle) $(shell pkg-config --libs hogweed) -lgmp $(CFLAGS) -c $<