diff options
| -rw-r--r-- | flake.nix | 46 | ||||
| -rw-r--r-- | nix/boringsslshim.nix | 28 | ||||
| -rw-r--r-- | nix/libresslshim.nix | 23 | ||||
| -rw-r--r-- | nix/mbedtlsshim.nix | 22 |
4 files changed, 76 insertions, 43 deletions
@@ -43,30 +43,6 @@ }); - boringsslShim = with pkgs; stdenv.mkDerivation { - name = "BoringSSLShim"; - src = ./standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni; - - buildInputs = [ - patched_boringssl - pkg-config - jdk11_headless - ]; - - buildPhase = '' - make boringssl - ''; - - BORINGSSL_CFLAGS = "${patched_boringssl.dev.outPath}/include"; - # LD_LIBRARY_PATH = with pkgs; lib.makeLibraryPath [ - # patched_boringssl - # ]; - - installPhase = '' - mkdir --parents $out/lib - cp boringssl_provider.so $out/lib - ''; - }; libressl = pkgs.libressl.overrideAttrs (_old: rec { # devLibPath = pkgs.lib.makeLibraryPath [ pkgs.libressl.dev ]; @@ -103,25 +79,9 @@ ]; }); - mbedtlsShim = with pkgs; stdenv.mkDerivation rec { - name = "MbedTLSShim"; - src = ./standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni; - - buildInputs = [ - mbedtls - pkg-config - jdk11_headless - ]; - - buildPhase = '' - make mbedtls - ''; - - installPhase = '' - mkdir --parents $out/lib - cp mbedtls_provider.so $out/lib - ''; - }; + libresslShim = import ./nix/libresslshim.nix { pkgs = pkgs; libressl = libressl; }; + boringsslShim = import ./nix/boringsslshim.nix { pkgs = pkgs; boringssl = patched_boringssl; }; + mbedtlsShim = import ./nix/mbedtlsshim.nix { pkgs = pkgs; }; overlays = []; pkgs = import nixpkgs { inherit system overlays; diff --git a/nix/boringsslshim.nix b/nix/boringsslshim.nix new file mode 100644 index 0000000..1ed63d3 --- /dev/null +++ b/nix/boringsslshim.nix @@ -0,0 +1,28 @@ +{ + pkgs + , boringssl +}: +with pkgs; stdenv.mkDerivation { + name = "BoringSSLShim"; + src = ../standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni; + + buildInputs = [ + boringssl + pkg-config + jdk11_headless + ]; + + buildPhase = '' + make boringssl + ''; + + BORINGSSL_CFLAGS = "${boringssl.dev.outPath}/include"; + # LD_LIBRARY_PATH = with pkgs; lib.makeLibraryPath [ + # boringssl + # ]; + + installPhase = '' + mkdir --parents $out/lib + cp boringssl_provider.so $out/lib + ''; +} diff --git a/nix/libresslshim.nix b/nix/libresslshim.nix new file mode 100644 index 0000000..97bc3d9 --- /dev/null +++ b/nix/libresslshim.nix @@ -0,0 +1,23 @@ +{ + pkgs + , libressl +}: +with pkgs; stdenv.mkDerivation rec { + name = "LibreSSLShim"; + src = ../standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni; + + buildInputs = [ + libressl + pkg-config + jdk11_headless + ]; + + buildPhase = '' + make libressl + ''; + + installPhase = '' + mkdir --parents $out/lib + cp libressl_provider.so $out/lib + ''; +} diff --git a/nix/mbedtlsshim.nix b/nix/mbedtlsshim.nix new file mode 100644 index 0000000..2dff2f0 --- /dev/null +++ b/nix/mbedtlsshim.nix @@ -0,0 +1,22 @@ +{ + pkgs +}: +with pkgs; stdenv.mkDerivation rec { + name = "MbedTLSShim"; + src = ../standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni; + + buildInputs = [ + mbedtls + pkg-config + jdk11_headless + ]; + + buildPhase = '' + make mbedtls + ''; + + installPhase = '' + mkdir --parents $out/lib + cp mbedtls_provider.so $out/lib + ''; +} |
