aboutsummaryrefslogtreecommitdiff
path: root/nix/tomcryptshim.nix
blob: 565cb01525a6d2f199dc92d04f4f869858553fb0 (plain)
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
{
  pkgs,
  libtomcrypt,
  libtommath,
}:
with pkgs;
stdenv.mkDerivation {
  name = "TomCryptShim-${libtomcrypt.version}";
  src = ../standalone/src/main/resources/cz/crcs/ectester/standalone/libs/jni;

  buildInputs = [
    libtommath
    libtomcrypt
    pkg-config
    pkgs.jdk_headless
  ];

  buildPhase = ''
    make tomcrypt
  '';

  installPhase = ''
    mkdir --parents $out/lib
    cp tomcrypt_provider.so $out/lib
  '';
}