ripasso-cursive: cosmetic changes (#361736)
[NixPkgs.git] / pkgs / by-name / in / intel-media-sdk / package.nix
blob37c0e7253ad1fe71e8a3c6c689e352d01cdb3e42
1 { lib, stdenv, fetchFromGitHub, cmake, pkg-config, gtest, libdrm, libpciaccess, libva, libX11
2 , libXau, libXdmcp, libpthreadstubs, fetchpatch }:
4 stdenv.mkDerivation rec {
5   pname = "intel-media-sdk";
6   version = "23.2.2";
8   src = fetchFromGitHub {
9     owner = "Intel-Media-SDK";
10     repo = "MediaSDK";
11     rev = "intel-mediasdk-${version}";
12     hash = "sha256-wno3a/ZSKvgHvZiiJ0Gq9GlrEbfHCizkrSiHD6k/Loo=";
13   };
15   patches = [
16     # Search oneVPL-intel-gpu in NixOS specific /run/opengl-driver/lib directory
17     # See https://github.com/NixOS/nixpkgs/pull/315425
18     ./nixos-search-onevplrt-in-run-opengl-driver-lib.patch
19     # https://github.com/Intel-Media-SDK/MediaSDK/pull/3005
20     (fetchpatch {
21       name = "include-cstdint-explicitly.patch";
22       url = "https://github.com/Intel-Media-SDK/MediaSDK/commit/a4f37707c1bfdd5612d3de4623ffb2d21e8c1356.patch";
23       hash = "sha256-OPwGzcMTctJvHcKn5bHqV8Ivj4P7+E4K9WOKgECqf04=";
24     })
25   ];
27   nativeBuildInputs = [ cmake pkg-config ];
28   buildInputs = [
29     libdrm libva libpciaccess libX11 libXau libXdmcp libpthreadstubs
30   ];
31   nativeCheckInputs = [ gtest ];
33   cmakeFlags = [
34     "-DBUILD_SAMPLES=OFF"
35     "-DBUILD_TESTS=${if doCheck then "ON" else "OFF"}"
36     "-DUSE_SYSTEM_GTEST=ON"
37   ];
39   doCheck = true;
41   meta = with lib; {
42     description = "Intel Media SDK";
43     mainProgram = "mfx-tracer-config";
44     license = licenses.mit;
45     maintainers = with maintainers; [ midchildan pjungkamp ];
46     platforms = [ "x86_64-linux" ];
47   };