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";
|
2023-02-09 11:40:11 +00:00
|
|
|
version = "unstable-2022-10-13";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "DisplayLink";
|
|
|
|
repo = pname;
|
2023-02-09 11:40:11 +00:00
|
|
|
rev = "bdc258b25df4d00f222fde0e3c5003bf88ef17b5";
|
|
|
|
hash = "sha256-mt+vEp9FFf7smmE2PzuH/3EYl7h89RBN1zTVvv2qJ/o=";
|
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;
|
|
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|