git.iko.soy/typeable/nixpkgs
on master help sign in
linuxPackages.displaylink: init at 1.1.62
commitfbf6a97b04bba5f36a3caf26f54034324397f15a authorNikolay Amiantov <ab@fmap.me> dateSat 27 Aug 2016, 19:46 (10 years ago) parent6b20d5b
2 files changed+72
pkgs/os-specific/linux/displaylink/default.nix+70 pkgs/top-level/all-packages.nix+2
pkgs/os-specific/linux/displaylink/default.nixnew file+70
@@ -0,0 +1,70 @@
1+{ stdenv, lib, fetchurl, fetchFromGitHub, unzip, kernel, utillinux, libdrm, libusb1, makeWrapper }:
2+
3+let
4+ arch =
5+ if stdenv.system == "x86_64-linux" then "x64"
6+ else if stdenv.system == "i686-linux" then "x86"
7+ else throw "Unsupported architecture";
8+ libPath = lib.makeLibraryPath [ stdenv.cc.cc utillinux libusb1 ];
9+
10+in stdenv.mkDerivation rec {
11+ name = "displaylink-${version}";
12+ version = "1.1.62";
13+
14+ src = fetchFromGitHub {
15+ owner = "DisplayLink";
16+ repo = "evdi";
17+ rev = "fe779940ff9fc7b512019619e24a5b22e4070f6a";
18+ sha256 = "02hw83f6lscms8hssjzf30hl9zly3b28qcxwmxvnqwfhx1q491z9";
19+ };
20+
21+ daemon = fetchurl {
22+ name = "displaylink.zip";
23+ url = "http://www.displaylink.com/downloads/file?id=607";
24+ sha256 = "0jky3xk4dfzbzg386qya9l9952i4m8zhf55fdl06pi9r82k2iijx";
25+ };
26+
27+ nativeBuildInputs = [ unzip makeWrapper ];
28+
29+ buildInputs = [ kernel libdrm ];
30+
31+ buildCommand = ''
32+ unpackPhase
33+ cd $sourceRoot
34+ unzip $daemon
35+ chmod +x displaylink-driver-${version}.run
36+ ./displaylink-driver-${version}.run --target daemon --noexec
37+
38+ ( cd module
39+ export makeFlags="$makeFlags KVER=${kernel.modDirVersion} KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
40+ export hardeningDisable="pic format"
41+ buildPhase
42+ install -Dm755 evdi.ko $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/gpu/drm/evdi/evdi.ko
43+ )
44+
45+ ( cd library
46+ buildPhase
47+ install -Dm755 libevdi.so $out/lib/libevdi.so
48+ )
49+
50+ fixupPhase
51+
52+ ( cd daemon
53+ install -Dt $out/lib/displaylink *.spkg
54+ install -Dm755 ${arch}/DisplayLinkManager $out/bin/DisplayLinkManager
55+ patchelf \
56+ --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) \
57+ --set-rpath $out/lib:${libPath} \
58+ $out/bin/DisplayLinkManager
59+ wrapProgram $out/bin/DisplayLinkManager \
60+ --run "cd $out/lib/displaylink"
61+ )
62+ '';
63+
64+ meta = with stdenv.lib; {
65+ description = "DisplayLink DL-5xxx, DL-41xx and DL-3x00 Driver for Linux";
66+ platforms = [ "x86_64-linux" "i686-linux" ];
67+ license = licenses.unfree;
68+ homepage = "http://www.displaylink.com/";
69+ };
70+}
pkgs/top-level/all-packages.nix+2
@@ -11241,6 +11241,8 @@ in
1124111241
1124211242 cpupower = callPackage ../os-specific/linux/cpupower { };
1124311243
11244+ displaylink = callPackage ../os-specific/linux/displaylink { };
11245+
1124411246 dpdk = callPackage ../os-specific/linux/dpdk { };
1124511247
1124611248 pktgen = callPackage ../os-specific/linux/pktgen { };