aboutsummaryrefslogtreecommitdiff
path: root/nix
diff options
context:
space:
mode:
authorJ08nY2024-08-19 21:02:16 +0200
committerJ08nY2024-08-19 21:02:16 +0200
commit5d991aed245974614437baec9903aee90c9d8879 (patch)
tree8ef54df9be9de3ed7a24763a28c189d75343bafd /nix
parent2a9e5944bd3f444b4866bdf5830d444020799c18 (diff)
downloadECTester-5d991aed245974614437baec9903aee90c9d8879.tar.gz
ECTester-5d991aed245974614437baec9903aee90c9d8879.tar.zst
ECTester-5d991aed245974614437baec9903aee90c9d8879.zip
Diffstat (limited to 'nix')
-rw-r--r--nix/boringsslshim.nix9
-rw-r--r--nix/botanshim.nix18
-rw-r--r--nix/commonlibs.nix2
-rw-r--r--nix/cryptoppshim.nix4
-rw-r--r--nix/gcryptshim.nix11
-rw-r--r--nix/ippcpshim.nix6
-rw-r--r--nix/libresslshim.nix11
-rw-r--r--nix/mbedtlsshim.nix9
-rw-r--r--nix/nettleshim.nix11
-rw-r--r--nix/opensslshim.nix11
-rw-r--r--nix/tomcryptshim.nix4
11 files changed, 63 insertions, 33 deletions
diff --git a/nix/boringsslshim.nix b/nix/boringsslshim.nix
index 4fb8a02..7fc337f 100644
--- a/nix/boringsslshim.nix
+++ b/nix/boringsslshim.nix
@@ -1,20 +1,23 @@
{ pkgs, boringssl }:
with pkgs;
stdenv.mkDerivation {
- name = "BoringSSLShim";
+ name = "BoringSSLShim-${boringssl.version}";
src = ../standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni;
buildInputs = [
boringssl
pkg-config
- jdk
+ pkgs.jdk_headless
];
buildPhase = ''
make boringssl
'';
- BORINGSSL_CFLAGS = "-I${boringssl.dev.outPath}/include -DECTESTER_BORINGSSL_${boringssl.version}=1";
+ BORINGSSL_CFLAGS = ''
+ -I${boringssl.dev.outPath}/include \
+ -DECTESTER_BORINGSSL_${boringssl.version}=1 \
+ '';
installPhase = ''
mkdir --parents $out/lib
diff --git a/nix/botanshim.nix b/nix/botanshim.nix
index eb74a6b..086d653 100644
--- a/nix/botanshim.nix
+++ b/nix/botanshim.nix
@@ -1,24 +1,28 @@
{
- stdenv,
- botan2,
- pkg-config,
- jdk,
+ pkgs,
+ botan2
}:
+with pkgs;
stdenv.mkDerivation {
- name = "BotanShim";
+ name = "BotanShim-${botan2.version}";
src = ../standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni;
buildInputs = [
botan2
pkg-config
- jdk
+ pkgs.jdk_headless
];
buildPhase = ''
make botan
'';
- BOTAN_CXXFLAGS = "-DECTESTER_BOTAN_${builtins.replaceStrings ["."] ["_"] botan2.version}=1";
+ BOTAN_CXXFLAGS = ''
+ -DECTESTER_BOTAN_${builtins.replaceStrings ["."] ["_"] botan2.version}=1 \
+ -DECTESTER_BOTAN_MAJOR=${pkgs.lib.versions.major botan2.version} \
+ -DECTESTER_BOTAN_MINOR=${pkgs.lib.versions.minor botan2.version} \
+ -DECTESTER_BOTAN_PATCH=${pkgs.lib.versions.patch botan2.version} \
+ '';
installPhase = ''
mkdir --parents $out/lib
diff --git a/nix/commonlibs.nix b/nix/commonlibs.nix
index f054683..ab64937 100644
--- a/nix/commonlibs.nix
+++ b/nix/commonlibs.nix
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
pkg-config
cmake
which
- jdk
+ pkgs.jdk_headless
];
dontUseCmakeConfigure = true;
diff --git a/nix/cryptoppshim.nix b/nix/cryptoppshim.nix
index c225e8c..627c5c9 100644
--- a/nix/cryptoppshim.nix
+++ b/nix/cryptoppshim.nix
@@ -4,13 +4,13 @@ let
dotVersion = builtins.replaceStrings ["_"] ["."] cryptopp.version;
in
stdenv.mkDerivation {
- name = "Crypto++ Shim";
+ name = "Crypto++Shim-${cryptopp.version}";
src = ../standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni;
buildInputs = [
cryptopp
pkg-config
- jdk
+ pkgs.jdk_headless
];
buildPhase = ''
diff --git a/nix/gcryptshim.nix b/nix/gcryptshim.nix
index 869bcd9..d31b4cc 100644
--- a/nix/gcryptshim.nix
+++ b/nix/gcryptshim.nix
@@ -5,21 +5,26 @@
}:
with pkgs;
stdenv.mkDerivation {
- name = "Gcrypt Shim";
+ name = "GcryptShim-${libgcrypt.version}";
src = ../standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni;
buildInputs = [
libgcrypt
libgpg-error
pkg-config
- jdk11_headless
+ pkgs.jdk_headless
];
buildPhase = ''
make gcrypt
'';
- LIBGCRYPT_CFLAGS = "-DECTESTER_LIBGCRYPT_${builtins.replaceStrings ["."] ["_"] libgcrypt.version}=1";
+ LIBGCRYPT_CFLAGS = ''
+ -DECTESTER_LIBGCRYPT_${builtins.replaceStrings ["."] ["_"] libgcrypt.version}=1 \
+ -DECTESTER_LIBGCRYPT_MAJOR=${pkgs.lib.versions.major libgcrypt.version} \
+ -DECTESTER_LIBGCRYPT_MINOR=${pkgs.lib.versions.minor libgcrypt.version} \
+ -DECTESTER_LIBGCRYPT_PATCH=${pkgs.lib.versions.patch libgcrypt.version} \
+ '';
installPhase = ''
mkdir --parents $out/lib
diff --git a/nix/ippcpshim.nix b/nix/ippcpshim.nix
index 465c3c2..33333ba 100644
--- a/nix/ippcpshim.nix
+++ b/nix/ippcpshim.nix
@@ -1,16 +1,16 @@
{ pkgs, ipp-crypto }:
with pkgs;
stdenv.mkDerivation rec {
- name = "IppCryptoShim";
+ name = "IppCryptoShim-${ipp-crypto.version}";
src = ../standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni;
buildInputs = [
ipp-crypto
pkg-config
- jdk
+ pkgs.jdk_headless
];
- IPP_CRYPTO_CFLAGS = "-I${ipp-crypto.dev}/include -DECTESTER_IPPCP_VERSION=${ipp-crypto.version}";
+ IPP_CRYPTO_CFLAGS = "-I${ipp-crypto.dev}/include -DECTESTER_IPPCP_${ipp-crypto.version}=1";
IPP_CRYPTO_LFLAGS = "-L${ipp-crypto}/lib/";
buildPhase = ''
diff --git a/nix/libresslshim.nix b/nix/libresslshim.nix
index 100e941..c6c8677 100644
--- a/nix/libresslshim.nix
+++ b/nix/libresslshim.nix
@@ -1,20 +1,25 @@
{ pkgs, libressl }:
with pkgs;
stdenv.mkDerivation rec {
- name = "LibreSSLShim";
+ name = "LibreSSLShim-${libressl.version}";
src = ../standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni;
buildInputs = [
libressl
pkg-config
- jdk
+ pkgs.jdk_headless
];
buildPhase = ''
make libressl
'';
- LIBRESSL_CFLAGS = "-DECTESTER_LIBRESSL_${builtins.replaceStrings ["."] ["_"] libressl.version}=1";
+ LIBRESSL_CFLAGS = ''
+ -DECTESTER_LIBRESSL_${builtins.replaceStrings ["."] ["_"] libressl.version}=1 \
+ -DECTESTER_LIBRESSL_MAJOR=${pkgs.lib.versions.major libressl.version} \
+ -DECTESTER_LIBRESSL_MINOR=${pkgs.lib.versions.minor libressl.version} \
+ -DECTESTER_LIBRESSL_PATCH=${pkgs.lib.versions.patch libressl.version} \
+ '';
installPhase = ''
mkdir --parents $out/lib
diff --git a/nix/mbedtlsshim.nix b/nix/mbedtlsshim.nix
index 0b31907..5f9b1c5 100644
--- a/nix/mbedtlsshim.nix
+++ b/nix/mbedtlsshim.nix
@@ -1,14 +1,17 @@
{ pkgs, mbedtls }:
with pkgs;
+let
+ rawVersion = pkgs.lib.strings.removePrefix "v" mbedtls.version;
+in
stdenv.mkDerivation rec {
- name = "MbedTLSShim";
+ name = "MbedTLSShim-${mbedtls.version}";
src = ../standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni;
- rawVersion = pkgs.lib.strings.removePrefix "v" mbedtls.version;
+
buildInputs = [
mbedtls
pkg-config
- jdk
+ pkgs.jdk_headless
];
buildPhase = ''
diff --git a/nix/nettleshim.nix b/nix/nettleshim.nix
index 42da7ff..8aba867 100644
--- a/nix/nettleshim.nix
+++ b/nix/nettleshim.nix
@@ -5,21 +5,26 @@
}:
with pkgs;
stdenv.mkDerivation rec {
- name = "NettleShim";
+ name = "NettleShim-${nettle.version}";
src = ../standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni;
buildInputs = [
nettle
gmp
pkg-config
- jdk
+ pkgs.jdk_headless
];
buildPhase = ''
make nettle
'';
- NETTLE_CFLAGS = "-DECTESTER_NETTLE_${builtins.replaceStrings ["."] ["_"] nettle.version}=1";
+ NETTLE_CFLAGS = ''
+ -DECTESTER_NETTLE_${builtins.replaceStrings ["."] ["_"] nettle.version}=1 \
+ -DECTESTER_NETTLE_MAJOR=${pkgs.lib.versions.major nettle.version} \
+ -DECTESTER_NETTLE_MINOR=${pkgs.lib.versions.minor nettle.version} \
+ -DECTESTER_NETTLE_PATCH=${pkgs.lib.versions.patch nettle.version} \
+ '';
installPhase = ''
mkdir --parents $out/lib
diff --git a/nix/opensslshim.nix b/nix/opensslshim.nix
index 7c585fc..78df0fd 100644
--- a/nix/opensslshim.nix
+++ b/nix/opensslshim.nix
@@ -1,20 +1,25 @@
{ pkgs, openssl }:
with pkgs;
stdenv.mkDerivation {
- name = "OpenSSL Shim";
+ name = "OpenSSLShim-${openssl.version}";
src = ../standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni;
buildInputs = [
openssl
pkg-config
- jdk
+ pkgs.jdk_headless
];
buildPhase = ''
make openssl
'';
- OPENSSL_CFLAGS = "-DECTESTER_OPENSSL_${builtins.replaceStrings ["."] ["_"] openssl.version}=1";
+ OPENSSL_CFLAGS = ''
+ -DECTESTER_OPENSSL_${builtins.replaceStrings ["."] ["_"] openssl.version}=1 \
+ -DECTESTER_OPENSSL_MAJOR=${pkgs.lib.versions.major openssl.version} \
+ -DECTESTER_OPENSSL_MINOR=${pkgs.lib.versions.minor openssl.version} \
+ -DECTESTER_OPENSSL_PATCH=${pkgs.lib.versions.patch openssl.version} \
+ '';
installPhase = ''
mkdir --parents $out/lib
diff --git a/nix/tomcryptshim.nix b/nix/tomcryptshim.nix
index d4f1f2f..565cb01 100644
--- a/nix/tomcryptshim.nix
+++ b/nix/tomcryptshim.nix
@@ -5,14 +5,14 @@
}:
with pkgs;
stdenv.mkDerivation {
- name = "TomCryptShim";
+ name = "TomCryptShim-${libtomcrypt.version}";
src = ../standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni;
buildInputs = [
libtommath
libtomcrypt
pkg-config
- jdk
+ pkgs.jdk_headless
];
buildPhase = ''