Skip to content

Commit bddeacb

Browse files
committed
Don't use newer version of WolfCrypt
1 parent 40dde8f commit bddeacb

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

flake.lock

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+14-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
66
flake-utils.url = "github:numtide/flake-utils";
77
gradle2nix.url = "github:tadfisher/gradle2nix/03c1b713ad139eb6dfc8d463b5bd348368125cf1";
8-
custom-nixpkgs.url = "github:quapka/nixpkgs/add-ipp-crypto"; # custom for of nixpkgs with ipp-crypto packaged
8+
custom-nixpkgs.url = "github:quapka/nixpkgs/customPkgs"; # custom for of nixpkgs with ipp-crypto packaged
99
# FIXME how to add submodule declaratively?
1010
# submodule = {
1111
# url = ./
@@ -15,6 +15,14 @@
1515
outputs = { self, nixpkgs, custom-nixpkgs, flake-utils, gradle2nix, ... }:
1616
flake-utils.lib.eachDefaultSystem (system:
1717
let
18+
wolfcryptjni = with customPkgs; wolfcrypt-jni.overrideAttrs (final: prev: {
19+
src = pkgs.fetchFromGitHub {
20+
owner = "wolfSSL";
21+
repo = "wolfcrypt-jni";
22+
rev = "0497ee767c994775beda2f2091009593961e5c7e";
23+
hash = "sha256-mtUXUyIKJ617WzAWjlOaMscWM7zuGBISVMEAbmQNBOg=";
24+
};
25+
});
1826
patched_boringssl = with pkgs; pkgs.boringssl.overrideAttrs (final: prev: rec {
1927
src = fetchgit {
2028
url = "https://boringssl.googlesource.com/boringssl";
@@ -124,6 +132,7 @@
124132
cp ${boringsslShim.out}/lib/boringssl_provider.so standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/
125133
cp ${patched_boringssl.out}/lib/lib_boringssl.a standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/
126134
cp ${mbedtlsShim.out}/lib/mbedtls_provider.so standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/
135+
cp ${wolfcryptjni}/lib/* standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/
127136
pushd standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/
128137
make lib_timing.so lib_csignals.so lib_cppsignals.so
129138
popd
@@ -200,9 +209,11 @@
200209
gmp
201210
libgpg-error
202211
libconfig
212+
wolfcryptjni
203213
];
204214

205215
BORINGSSL_CFLAGS = "${patched_boringssl.dev.outPath}/include";
216+
WOLFCRYPT_LIB_PATH = "${wolfcryptjni}/lib";
206217

207218
# FIXME more things to copy here
208219
installPhase = ''
@@ -309,9 +320,11 @@
309320
gmp
310321
libgpg-error
311322
libconfig
323+
wolfcryptjni
312324
];
313325

314326
BORINGSSL_CFLAGS = "${patched_boringssl.dev.outPath}/include";
327+
WOLFCRYPT_LIB_PATH = "${wolfcryptjni}/lib";
315328

316329

317330
IPP_CRYPTO_HEADER = "${customPkgs.ipp-crypto.dev}/include";

0 commit comments

Comments
 (0)