2021-08-05 21:33:18 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, kernel, libdrm }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "evdi";
|
2022-07-14 12:49:19 +00:00
|
|
|
version = "1.11.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "DisplayLink";
|
|
|
|
repo = pname;
|
2022-02-10 20:34:41 +00:00
|
|
|
rev = "v${version}";
|
2022-07-14 12:49:19 +00:00
|
|
|
sha256 = "12n2xbpw2901cvzw467saqqsgs4mwrzp7fs5j2vlyl7kwpcr0pj0";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
NIX_CFLAGS_COMPILE = "-Wno-error -Wno-error=sign-compare";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
|
|
|
buildInputs = [ kernel libdrm ];
|
|
|
|
|
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; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Extensible Virtual Display Interface";
|
2020-07-18 16:06:22 +00:00
|
|
|
maintainers = with maintainers; [ eyjhb ];
|
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
|
|
|
};
|
|
|
|
}
|