|
5 | 5 | nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
6 | 6 | flake-utils.url = "github:numtide/flake-utils";
|
7 | 7 | 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 |
9 | 9 | # FIXME how to add submodule declaratively?
|
10 | 10 | # submodule = {
|
11 | 11 | # url = ./
|
|
15 | 15 | outputs = { self, nixpkgs, custom-nixpkgs, flake-utils, gradle2nix, ... }:
|
16 | 16 | flake-utils.lib.eachDefaultSystem (system:
|
17 | 17 | 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 | + }); |
18 | 26 | patched_boringssl = with pkgs; pkgs.boringssl.overrideAttrs (final: prev: rec {
|
19 | 27 | src = fetchgit {
|
20 | 28 | url = "https://boringssl.googlesource.com/boringssl";
|
|
124 | 132 | cp ${boringsslShim.out}/lib/boringssl_provider.so standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/
|
125 | 133 | cp ${patched_boringssl.out}/lib/lib_boringssl.a standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/
|
126 | 134 | 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/ |
127 | 136 | pushd standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni/
|
128 | 137 | make lib_timing.so lib_csignals.so lib_cppsignals.so
|
129 | 138 | popd
|
|
200 | 209 | gmp
|
201 | 210 | libgpg-error
|
202 | 211 | libconfig
|
| 212 | + wolfcryptjni |
203 | 213 | ];
|
204 | 214 |
|
205 | 215 | BORINGSSL_CFLAGS = "${patched_boringssl.dev.outPath}/include";
|
| 216 | + WOLFCRYPT_LIB_PATH = "${wolfcryptjni}/lib"; |
206 | 217 |
|
207 | 218 | # FIXME more things to copy here
|
208 | 219 | installPhase = ''
|
|
309 | 320 | gmp
|
310 | 321 | libgpg-error
|
311 | 322 | libconfig
|
| 323 | + wolfcryptjni |
312 | 324 | ];
|
313 | 325 |
|
314 | 326 | BORINGSSL_CFLAGS = "${patched_boringssl.dev.outPath}/include";
|
| 327 | + WOLFCRYPT_LIB_PATH = "${wolfcryptjni}/lib"; |
315 | 328 |
|
316 | 329 |
|
317 | 330 | IPP_CRYPTO_HEADER = "${customPkgs.ipp-crypto.dev}/include";
|
|
0 commit comments