nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, stdenv
3, fetchFromGitHub
4, autoreconfHook
5, buildPackages
6 # libkcapi offers multiple tools. They can be disabled for minimization.
7, kcapi-test ? true
8, kcapi-speed ? true
9, kcapi-hasher ? true
10, kcapi-rngapp ? true
11, kcapi-encapp ? true
12, kcapi-dgstapp ? true
13}:
14
15stdenv.mkDerivation rec {
16 pname = "libkcapi";
17 version = "1.5.0";
18
19 src = fetchFromGitHub {
20 owner = "smuellerDD";
21 repo = "libkcapi";
22 rev = "v${version}";
23 hash = "sha256-xOI29cjhUGUeHLaYIrPA5ZwwCE9lBdZG6kaW0lo1uL8=";
24 };
25
26 nativeBuildInputs = [ autoreconfHook ];
27
28 # libkcapi looks also for a host c compiler when cross-compiling
29 # otherwise you obtain following error message:
30 # "error: no acceptable C compiler found in $PATH"
31 depsBuildBuild = [
32 buildPackages.stdenv.cc
33 ];
34
35 enableParallelBuilding = true;
36
37 configureFlags =
38 lib.optional kcapi-test "--enable-kcapi-test" ++
39 lib.optional kcapi-speed "--enable-kcapi-speed" ++
40 lib.optional kcapi-hasher "--enable-kcapi-hasher" ++
41 lib.optional kcapi-rngapp "--enable-kcapi-rngapp" ++
42 lib.optional kcapi-encapp "--enable-kcapi-encapp" ++
43 lib.optional kcapi-dgstapp "--enable-kcapi-dgstapp"
44 ;
45
46 meta = {
47 homepage = "http://www.chronox.de/libkcapi.html";
48 description = "Linux Kernel Crypto API User Space Interface Library";
49 license = with lib.licenses; [ bsd3 gpl2Only ];
50 platforms = lib.platforms.linux;
51 maintainers = with lib.maintainers; [ orichter thillux ];
52 };
53}