1 { stdenv, lib, fetchFromGitHub, kernel }:
3 stdenv.mkDerivation rec {
4 name = "isgx-${version}-${kernel.version}";
7 src = fetchFromGitHub {
9 repo = "linux-sgx-driver";
10 rev = "sgx_diver_${version}"; # Typo is upstream's.
11 sha256 = "0kbbf2inaywp44lm8ig26mkb36jq3smsln0yp6kmrirdwc3c53mi";
14 hardeningDisable = [ "pic" ];
16 nativeBuildInputs = kernel.moduleBuildDependencies;
19 "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
24 install -D isgx.ko -t $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/intel/sgx
28 enableParallelBuilding = true;
31 description = "Intel SGX Linux Driver";
33 The linux-sgx-driver project (isgx) hosts an out-of-tree driver
34 for the Linux* Intel(R) SGX software stack, which would be used
35 until the driver upstreaming process is complete (before 5.11.0).
37 It is used to support Enhanced Privacy Identification (EPID)
38 based attestation on the platforms without Flexible Launch Control.
40 homepage = "https://github.com/intel/linux-sgx-driver";
41 license = with licenses; [ bsd3 /* OR */ gpl2Only ];
43 platforms = [ "x86_64-linux" ];