1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 kernel ? false,
6 kernelModuleMakeFlags ? [ ],
7}:
8
9stdenv.mkDerivation (finalAttrs: {
10 pname = "cryptodev-linux";
11 version = "1.14";
12
13 src = fetchFromGitHub {
14 owner = "cryptodev-linux";
15 repo = "cryptodev-linux";
16 rev = "cryptodev-linux-${finalAttrs.version}";
17 hash = "sha256-N7fGOMEWrb/gm1MDiJgq2QyTOni6n9w2H52baXmRA1g=";
18 };
19
20 nativeBuildInputs = kernel.moduleBuildDependencies;
21 hardeningDisable = [ "pic" ];
22
23 makeFlags = kernelModuleMakeFlags ++ [
24 "KERNEL_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
25 "INSTALL_MOD_PATH=$(out)"
26 "prefix=$(out)"
27 ];
28
29 meta = {
30 description = "Device that allows access to Linux kernel cryptographic drivers";
31 homepage = "http://cryptodev-linux.org/";
32 maintainers = with lib.maintainers; [ moni ];
33 license = lib.licenses.gpl2Plus;
34 platforms = lib.platforms.linux;
35 };
36})