forked from mirrors/nixpkgs
38 lines
1 KiB
Nix
38 lines
1 KiB
Nix
{ stdenv, fetchFromGitHub, kernel, libdrm }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "evdi";
|
|
version = "1.6.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "DisplayLink";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "1yrjm8lvvz3v4h5af6m9qzq6z4lbgd7qbvq5rz7sjhdsh7g6qibd";
|
|
};
|
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
buildInputs = [ kernel libdrm ];
|
|
|
|
makeFlags = [
|
|
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
|
"KVER=${kernel.modDirVersion}"
|
|
];
|
|
|
|
hardeningDisable = [ "format" "pic" "fortify" ];
|
|
|
|
installPhase = ''
|
|
install -Dm755 module/evdi.ko $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/gpu/drm/evdi/evdi.ko
|
|
install -Dm755 library/libevdi.so $out/lib/libevdi.so
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "Extensible Virtual Display Interface";
|
|
homepage = "https://www.displaylink.com/";
|
|
license = with licenses; [ lgpl21 gpl2 ];
|
|
platforms = platforms.linux;
|
|
broken = versionOlder kernel.version "4.9" || stdenv.isAarch64;
|
|
};
|
|
}
|