2024-02-07 01:22:34 +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
|
2024-02-07 01:22:34 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "evdi";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "1.14.1-unstable-2024-01-30";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "DisplayLink";
|
2024-02-07 01:22:34 +00:00
|
|
|
repo = "evdi";
|
|
|
|
rev = "d21a6ea3c69ba180457966a04b6545d321cf46ca";
|
|
|
|
hash = "sha256-Txa9yX9h3GfmHRRNvhrfrsUoQhqRWbBt4gJYAZTNe0w=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString [
|
|
|
|
"-Wno-error"
|
|
|
|
"-Wno-error=discarded-qualifiers" # for Linux 4.19 compatibility
|
|
|
|
"-Wno-error=sign-compare"
|
|
|
|
];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
2024-02-07 01:22:34 +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 = ''
|
2024-02-07 01:22:34 +00:00
|
|
|
runHook preInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
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
|
2024-02-07 01:22:34 +00:00
|
|
|
runHook postInstall
|
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; {
|
2024-02-07 01:22:34 +00:00
|
|
|
broken = kernel.kernelOlder "4.19";
|
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";
|
2024-02-07 01:22:34 +00:00
|
|
|
homepage = "https://www.displaylink.com/";
|
|
|
|
license = with licenses; [ lgpl21Only gpl2Only ];
|
2023-07-15 17:15:38 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
2024-02-07 01:22:34 +00:00
|
|
|
})
|