aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.nix2
-rw-r--r--nix/nettleshim.nix23
2 files changed, 25 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
index 59e9da3..e48a485 100644
--- a/flake.nix
+++ b/flake.nix
@@ -124,6 +124,7 @@
gcryptShim = import ./nix/gcryptshim.nix { inherit pkgs libgcrypt libgpg-error; };
mbedtlsShim = import ./nix/mbedtlsshim.nix { pkgs = pkgs; };
ippcpShim = import ./nix/ippcpshim.nix { pkgs = pkgs; ipp-crypto = customPkgs.ipp-crypto; };
+ nettleShim = import ./nix/nettleshim.nix { inherit pkgs nettle; };
libresslShim = import ./nix/libresslshim.nix { inherit pkgs libressl; };
overlays = [];
@@ -158,6 +159,7 @@
cp ${gcryptShim.out}/lib/gcrypt_provider.so ${jniLibsPath}
cp ${mbedtlsShim.out}/lib/mbedtls_provider.so ${jniLibsPath}
cp ${ippcpShim.out}/lib/ippcp_provider.so ${jniLibsPath}
+ cp ${nettleShim.out}/lib/nettle_provider.so ${jniLibsPath}
cp ${libresslShim.out}/lib/libressl_provider.so ${jniLibsPath}
cp ${wolfcryptjni}/lib/* ${jniLibsPath}
cp ${commonLibs}/lib/* ${jniLibsPath}
diff --git a/nix/nettleshim.nix b/nix/nettleshim.nix
new file mode 100644
index 0000000..f00c4e4
--- /dev/null
+++ b/nix/nettleshim.nix
@@ -0,0 +1,23 @@
+{
+ pkgs
+ , nettle
+}:
+with pkgs; stdenv.mkDerivation rec {
+ name = "NettleShim";
+ src = ../standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni;
+
+ buildInputs = [
+ nettle
+ pkg-config
+ jdk11_headless
+ ];
+
+ buildPhase = ''
+ make nettle
+ '';
+
+ installPhase = ''
+ mkdir --parents $out/lib
+ cp nettle_provider.so $out/lib
+ '';
+}