python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / security / opencryptoki / default.nix
blob140f032a5fde89e1adc299b2b4ebd77b4d51828d
1 { lib, stdenv, fetchFromGitHub, openssl, trousers, autoreconfHook, libtool, bison, flex }:
3 stdenv.mkDerivation rec {
4   pname = "opencryptoki";
5   version = "3.8.2";
7   src = fetchFromGitHub {
8     owner = "opencryptoki";
9     repo = "opencryptoki";
10     rev = "v${version}";
11     sha256 = "1rf7cmibmx636vzv7p54g212478a8wim2lfjf2861hfd0m96nv4l";
12   };
14   nativeBuildInputs = [ autoreconfHook libtool bison flex ];
15   buildInputs = [ openssl trousers ];
17   postPatch = ''
18     substituteInPlace configure.ac \
19       --replace "usermod" "true" \
20       --replace "groupadd" "true" \
21       --replace "chmod" "true" \
22       --replace "chgrp" "true"
23     substituteInPlace usr/lib/Makefile.am --replace "DESTDIR" "out"
24   '';
26   configureFlags = [
27     "--prefix=$(out)"
28     "--disable-ccatok"
29     "--disable-icatok"
30   ];
32   enableParallelBuilding = true;
34   meta = with lib; {
35     description = "PKCS#11 implementation for Linux";
36     homepage    = "https://github.com/opencryptoki/opencryptoki";
37     license     = licenses.cpl10;
38     maintainers = [ ];
39     platforms   = platforms.unix;
40   };