From f98f701ea2b76ceccea6f24fbcf7456470e5cb03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 4 Oct 2021 15:51:22 +0200 Subject: [PATCH] intel-media-driver: fix i686 build, add SuperSandro2000 as maintainer --- .../libraries/intel-media-driver/default.nix | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/intel-media-driver/default.nix b/pkgs/development/libraries/intel-media-driver/default.nix index a3825df47a97..4dfc43853661 100644 --- a/pkgs/development/libraries/intel-media-driver/default.nix +++ b/pkgs/development/libraries/intel-media-driver/default.nix @@ -1,7 +1,14 @@ -{ lib, stdenv, fetchFromGitHub -, cmake, pkg-config -, libva, libpciaccess, intel-gmmlib -, enableX11 ? stdenv.isLinux, libX11 +{ lib +, stdenv +, fetchFromGitHub +, fetchpatch +, cmake +, pkg-config +, libva +, libpciaccess +, intel-gmmlib +, enableX11 ? stdenv.isLinux +, libX11 }: stdenv.mkDerivation rec { @@ -11,12 +18,19 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; src = fetchFromGitHub { - owner = "intel"; - repo = "media-driver"; - rev = "intel-media-${version}"; + owner = "intel"; + repo = "media-driver"; + rev = "intel-media-${version}"; sha256 = "1ch1bvqg6p0i7ahblhy0h9c43y2mfhqb25v1s344iqsrywwcpzzr"; }; + patches = [ + (fetchpatch { + url = "https://salsa.debian.org/multimedia-team/intel-media-driver-non-free/-/raw/master/debian/patches/0002-Remove-settings-based-on-ARCH.patch"; + sha256 = "sha256-f4M0CPtAVf5l2ZwfgTaoPw7sPuAP/Uxhm5JSHEGhKT0="; + }) + ]; + cmakeFlags = [ "-DINSTALL_DRIVER_SYSCONF=OFF" "-DLIBVA_DRIVERS_PATH=${placeholder "out"}/lib/dri" @@ -24,6 +38,8 @@ stdenv.mkDerivation rec { "-DMEDIA_RUN_TEST_SUITE=OFF" ]; + NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.hostPlatform.system == "i686-linux") "-D_FILE_OFFSET_BITS=64"; + nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ libva libpciaccess intel-gmmlib ] @@ -45,6 +61,6 @@ stdenv.mkDerivation rec { changelog = "https://github.com/intel/media-driver/releases/tag/intel-media-${version}"; license = with licenses; [ bsd3 mit ]; platforms = platforms.linux; - maintainers = with maintainers; [ primeos jfrankenau ]; + maintainers = with maintainers; [ primeos jfrankenau SuperSandro2000 ]; }; }