summary refs log tree commit diff
path: root/pkgs/os-specific/linux/sgx/sdk/ipp-crypto.nix
blob: b9f682f5319b7b91f1b1f14fdeeb7409e28b2ae5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{ lib
, gcc11Stdenv
, fetchFromGitHub
, cmake
, nasm
, openssl_1_1
, python3
, extraCmakeFlags ? [ ]
}:

gcc11Stdenv.mkDerivation rec {
  pname = "ipp-crypto";
  version = "2021.3";

  src = fetchFromGitHub {
    owner = "intel";
    repo = "ipp-crypto";
    rev = "ippcp_${version}";
    hash = "sha256-QEJXvQ//zhQqibFxXwPMdS1MHewgyb24LRmkycVSGrM=";
  };

  # Fix typo: https://github.com/intel/ipp-crypto/pull/33
  postPatch = ''
    substituteInPlace sources/cmake/ippcp-gen-config.cmake \
      --replace 'ippcpo-config.cmake' 'ippcp-config.cmake'
  '';

  cmakeFlags = [ "-DARCH=intel64" ] ++ extraCmakeFlags;

  nativeBuildInputs = [
    cmake
    nasm
    openssl_1_1
    python3
  ];
}