From c0b250259c084f4e1f33b44eefb33b28d30a693d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 31 Aug 2021 17:50:46 +0200 Subject: [PATCH] intel-media-driver: enable x11 only on linux, split dev output, move meta to the file end --- .../libraries/intel-media-driver/default.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/intel-media-driver/default.nix b/pkgs/development/libraries/intel-media-driver/default.nix index b8f4d592b627..44ef637c9858 100644 --- a/pkgs/development/libraries/intel-media-driver/default.nix +++ b/pkgs/development/libraries/intel-media-driver/default.nix @@ -1,13 +1,15 @@ { lib, stdenv, fetchFromGitHub , cmake, pkg-config , libva, libpciaccess, intel-gmmlib -, enableX11 ? true, libX11 +, enableX11 ? stdenv.isLinux, libX11 }: stdenv.mkDerivation rec { pname = "intel-media-driver"; version = "21.3.2"; + outputs = [ "out" "dev" ]; + src = fetchFromGitHub { owner = "intel"; repo = "media-driver"; @@ -27,6 +29,11 @@ stdenv.mkDerivation rec { buildInputs = [ libva libpciaccess intel-gmmlib ] ++ lib.optional enableX11 libX11; + postFixup = lib.optionalString enableX11 '' + patchelf --set-rpath "$(patchelf --print-rpath $out/lib/dri/iHD_drv_video.so):${lib.makeLibraryPath [ libX11 ]}" \ + $out/lib/dri/iHD_drv_video.so + ''; + meta = with lib; { description = "Intel Media Driver for VAAPI — Broadwell+ iGPUs"; longDescription = '' @@ -40,9 +47,4 @@ stdenv.mkDerivation rec { platforms = platforms.linux; maintainers = with maintainers; [ primeos jfrankenau ]; }; - - postFixup = lib.optionalString enableX11 '' - patchelf --set-rpath "$(patchelf --print-rpath $out/lib/dri/iHD_drv_video.so):${lib.makeLibraryPath [ libX11 ]}" \ - $out/lib/dri/iHD_drv_video.so - ''; }