2021-08-30 13:43:34 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, kernel, kernelAtLeast }:
|
2021-03-31 23:33:38 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "isgx-${version}-${kernel.version}";
|
2021-08-30 13:43:34 +00:00
|
|
|
version = "2.14";
|
2021-03-31 23:33:38 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "intel";
|
|
|
|
repo = "linux-sgx-driver";
|
2021-08-30 13:43:34 +00:00
|
|
|
rev = "sgx_diver_${version}"; # Typo is upstream's.
|
|
|
|
sha256 = "0kbbf2inaywp44lm8ig26mkb36jq3smsln0yp6kmrirdwc3c53mi";
|
2021-03-31 23:33:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
install -D isgx.ko -t $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/intel/sgx
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2021-08-30 13:46:53 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-03-31 23:33:38 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Intel SGX Linux Driver";
|
|
|
|
longDescription = ''
|
|
|
|
The linux-sgx-driver project (isgx) hosts an out-of-tree driver
|
|
|
|
for the Linux* Intel(R) SGX software stack, which would be used
|
|
|
|
until the driver upstreaming process is complete (before 5.11.0).
|
|
|
|
|
|
|
|
It is used to support Enhanced Privacy Identification (EPID)
|
|
|
|
based attestation on the platforms without Flexible Launch Control.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/intel/linux-sgx-driver";
|
|
|
|
license = with licenses; [ bsd3 /* OR */ gpl2Only ];
|
|
|
|
maintainers = with maintainers; [ oxalica ];
|
2021-04-21 21:39:53 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2021-03-31 23:33:38 +00:00
|
|
|
};
|
|
|
|
}
|