linux_6_1: 6.1.117 -> 6.1.118
[NixPkgs.git] / pkgs / os-specific / linux / evdi / default.nix
blob85897310893d42cda127ad1b1aa13ad804fb2a2f
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , kernel
5 , libdrm
6 , python3
7 }:
9 let
10   python3WithLibs = python3.withPackages (ps: with ps; [
11     pybind11
12   ]);
14 stdenv.mkDerivation (finalAttrs: {
15   pname = "evdi";
16   version = "1.14.6";
18   src = fetchFromGitHub {
19     owner = "DisplayLink";
20     repo = "evdi";
21     rev = "refs/tags/v${finalAttrs.version}";
22     hash = "sha256-/XIWacrsB7qBqlLUwIGuDdahvt2dAwiK7dauFaYh7lU=";
23   };
25   env.NIX_CFLAGS_COMPILE = toString [
26     "-Wno-error"
27     "-Wno-error=discarded-qualifiers" # for Linux 4.19 compatibility
28     "-Wno-error=sign-compare"
29   ];
31   nativeBuildInputs = kernel.moduleBuildDependencies;
33   buildInputs = [
34     kernel
35     libdrm
36     python3WithLibs
37   ];
39   makeFlags = kernel.makeFlags ++ [
40     "KVER=${kernel.modDirVersion}"
41     "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
42   ];
44   hardeningDisable = [ "format" "pic" "fortify" ];
46   installPhase = ''
47     runHook preInstall
48     install -Dm755 module/evdi.ko $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/gpu/drm/evdi/evdi.ko
49     install -Dm755 library/libevdi.so $out/lib/libevdi.so
50     runHook postInstall
51   '';
53   enableParallelBuilding = true;
55   meta = with lib; {
56     broken = kernel.kernelOlder "4.19";
57     changelog = "https://github.com/DisplayLink/evdi/releases/tag/v${finalAttrs.version}";
58     description = "Extensible Virtual Display Interface";
59     homepage = "https://www.displaylink.com/";
60     license = with licenses; [ lgpl21Only gpl2Only ];
61     maintainers = [ ];
62     platforms = platforms.linux;
63   };