2023-07-15 17:15:38 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, kernel, libdrm, python3 }:
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
let
|
|
|
|
python3WithLibs = python3.withPackages (ps: with ps; [
|
|
|
|
pybind11
|
|
|
|
]);
|
|
|
|
in
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "evdi";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.14.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "DisplayLink";
|
|
|
|
repo = pname;
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-em3Y56saB7K3Wr31Y0boc38xGb57gdveN0Cstgy8y20=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-Wno-error -Wno-error=sign-compare";
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
buildInputs = [ kernel libdrm python3WithLibs ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
makeFlags = kernel.makeFlags ++ [
|
2020-04-24 23:36:52 +00:00
|
|
|
"KVER=${kernel.modDirVersion}"
|
|
|
|
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
|
|
|
];
|
|
|
|
|
|
|
|
hardeningDisable = [ "format" "pic" "fortify" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -Dm755 module/evdi.ko $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/gpu/drm/evdi/evdi.ko
|
2020-07-18 16:06:22 +00:00
|
|
|
install -Dm755 library/libevdi.so $out/lib/libevdi.so
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2023-10-09 19:29:22 +00:00
|
|
|
changelog = "https://github.com/DisplayLink/evdi/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Extensible Virtual Display Interface";
|
2023-07-15 17:15:38 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
2021-07-14 22:03:04 +00:00
|
|
|
license = with licenses; [ lgpl21Only gpl2Only ];
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.displaylink.com/";
|
2022-02-10 20:34:41 +00:00
|
|
|
broken = kernel.kernelOlder "4.19" || stdenv.isAarch64;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|