diff options
| author | J08nY | 2024-08-15 16:25:57 +0200 |
|---|---|---|
| committer | J08nY | 2024-08-15 17:18:57 +0200 |
| commit | d906ea9603d555c400cd4c85536d35f875358457 (patch) | |
| tree | 7c03f01e6a86da0e8117c9c8f95106cf5a73018a /flake.nix | |
| parent | 0dd90be10b70db6e342f7439340a698c4a0af352 (diff) | |
| download | ECTester-d906ea9603d555c400cd4c85536d35f875358457.tar.gz ECTester-d906ea9603d555c400cd4c85536d35f875358457.tar.zst ECTester-d906ea9603d555c400cd4c85536d35f875358457.zip | |
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 26 |
1 files changed, 23 insertions, 3 deletions
@@ -334,7 +334,8 @@ rev = "CRYPTOPP_${version}"; inherit hash; }; - installTargets = if pkgs.lib.strings.hasPrefix "8_" version then [ "install-lib" ] else [ "install" ]; + installTargets = + if pkgs.lib.strings.hasPrefix "8_" version then [ "install-lib" ] else [ "install" ]; } ); libresslBuilder = @@ -359,12 +360,14 @@ else (pkgs.libressl.override { buildShared = false; }).overrideAttrs ( final: prev: rec { + inherit version; src = pkgs.fetchurl { url = "mirror://openbsd/LibreSSL/${prev.pname}-${version}.tar.gz"; inherit hash; }; + patches = - if version == "3.8.2" then + if (pkgs.lib.strings.versionAtLeast version "3.8.2") then [ (pkgs.fetchpatch { url = "https://github.com/libressl/portable/commit/86e4965d7f20c3a6afc41d95590c9f6abb4fe788.patch"; @@ -375,6 +378,19 @@ else [ ]; + preConfigure = '' + ${pkgs.lib.strings.optionalString (pkgs.lib.strings.versionAtLeast version "2.2.2") '' + rm configure + substituteInPlace CMakeLists.txt \ + --replace 'exec_prefix \''${prefix}' "exec_prefix ${placeholder "bin"}" \ + --replace 'libdir \''${exec_prefix}' 'libdir \''${prefix}' + ''} + ''; + + postPatch = '' + patchShebangs tests/ + ''; + # NOTE: Due to name conflicts between OpenSSL and LibreSSL we need to resolve this manually. # This is not needed for building the individual shims through Nix, as libresslShim build env does not # contain OpenSSL at all, but for the interactive shell (started with `nix develop`), when multiple @@ -471,7 +487,11 @@ libgcrypt = libgcryptBuilder { inherit version hash; }; }; mbedtlsShimBuilder = - { version, hash, tag }: + { + version, + hash, + tag, + }: import ./nix/mbedtlsshim.nix { inherit pkgs; mbedtls = (mbedtlsBuilder { inherit version hash tag; }); |
