aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorquapka2024-06-19 12:52:30 +0200
committerquapka2024-06-19 12:52:30 +0200
commit84c71b38c0c74cbb5bbdc85c8864118722f257a4 (patch)
treee428f4fb62a5ec230a4eda5b54f3eeea034ec45f
parente256dd0b807d9f05a6d45c69bd551dad66b8b670 (diff)
downloadECTester-84c71b38c0c74cbb5bbdc85c8864118722f257a4.tar.gz
ECTester-84c71b38c0c74cbb5bbdc85c8864118722f257a4.tar.zst
ECTester-84c71b38c0c74cbb5bbdc85c8864118722f257a4.zip
Update Nix flake environment
-rw-r--r--flake.nix52
1 files changed, 51 insertions, 1 deletions
diff --git a/flake.nix b/flake.nix
index d9113b6..d3662e2 100644
--- a/flake.nix
+++ b/flake.nix
@@ -25,10 +25,12 @@
{
devShells.default = mkShell rec {
buildInputs = [
+ gdb
ant
jdk11
pkg-config
global-platform-pro
+ gradle
# libraries to test
openssl
boringssl
@@ -59,11 +61,24 @@
wolfssl
nettle
libressl
+
+ gmp
+ libgpg-error
+ wget
+ libconfig
];
LD_LIBRARY_PATH = with pkgs; pkgs.lib.makeLibraryPath [
+ libtommath
libtomcrypt
+ botan2
cryptopp
+ openssl
+ libgcrypt
+ nettle
+ gmp
+ libgpg-error
+ libconfig
];
# NOTE: Mixing postVenvCreation aznd shellHook results in only shellHook being called
@@ -89,6 +104,11 @@
popd
'';
+ # TODO OpenJDK 64-Bit Server VM warning: You have loaded library
+ # /home/qup/.local/share/ECTesterStandalone/lib/lib_ippcp.so which
+ # might have disabled stack guard. The VM will try to fix the stack
+ # guard now. It's highly recommended that you fix the library with
+ # 'execstack -c <libfile>', or link it with '-z noexecstack'.
buildIppCrypto = ''
CC=clang CXX=clang++ cmake CMakeLists.txt -GNinja -Bbuild -DARCH=intel64 # Does not work with GCC 12+
mkdir --parents build
@@ -97,7 +117,37 @@
popd
'';
- # shellHook = ''
+ buildMbedTLS = ''
+ python -m venv virt
+ . virt/bin/activate
+ pip install -r scripts/basic.requirements.txt
+ cmake -GNinja -Bbuild -DUSE_SHARED_MBEDTLS_LIBRARY=On
+ cd build
+ ninja
+ '';
+
+ wolfCrypt-JNI = ''
+ mkdir junit
+ wget -P junit/ https://repo1.maven.org/maven2/junit/junit/4.13.2/junit-4.13.2.jar
+ wget -P junit/ https://repo1.maven.org/maven2/org/hamcrest/hamcrest-all/1.3/hamcrest-all-1.3.jar
+ make -f makefile.linux
+ env JUNIT_HOME=junit/ ant build-jce-release
+ '';
+
+ # TODO add LD_LIB properly
+ shellHook = ''
+ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$HOME/projects/ts-spect-compiler/build/src/cosim
+
+ '';
+
+ # pushd ext/wolfcrypt-jni
+ # ${wolfCrypt-JNI}
+ # popd
+
+ # pushd ext/mbedtls
+ # ${buildMbedTLS}
+ # popd
+ # '';
# git submodule update --init --recursive
# pushd ext/boringssl