nixpkgs/pkgs/by-name/in/intel-media-sdk/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

49 lines
1.5 KiB
Nix

{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, gtest, libdrm, libpciaccess, libva, libX11
, libXau, libXdmcp, libpthreadstubs, fetchpatch }:
stdenv.mkDerivation rec {
pname = "intel-media-sdk";
version = "23.2.2";
src = fetchFromGitHub {
owner = "Intel-Media-SDK";
repo = "MediaSDK";
rev = "intel-mediasdk-${version}";
hash = "sha256-wno3a/ZSKvgHvZiiJ0Gq9GlrEbfHCizkrSiHD6k/Loo=";
};
patches = [
# Search oneVPL-intel-gpu in NixOS specific /run/opengl-driver/lib directory
# See https://github.com/NixOS/nixpkgs/pull/315425
./nixos-search-onevplrt-in-run-opengl-driver-lib.patch
# https://github.com/Intel-Media-SDK/MediaSDK/pull/3005
(fetchpatch {
name = "include-cstdint-explicitly.patch";
url = "https://github.com/Intel-Media-SDK/MediaSDK/commit/a4f37707c1bfdd5612d3de4623ffb2d21e8c1356.patch";
hash = "sha256-OPwGzcMTctJvHcKn5bHqV8Ivj4P7+E4K9WOKgECqf04=";
})
];
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [
libdrm libva libpciaccess libX11 libXau libXdmcp libpthreadstubs
];
nativeCheckInputs = [ gtest ];
cmakeFlags = [
"-DBUILD_SAMPLES=OFF"
"-DBUILD_TESTS=${if doCheck then "ON" else "OFF"}"
"-DUSE_SYSTEM_GTEST=ON"
];
doCheck = true;
meta = with lib; {
description = "Intel Media SDK";
mainProgram = "mfx-tracer-config";
license = licenses.mit;
maintainers = with maintainers; [ midchildan pjungkamp ];
platforms = [ "x86_64-linux" ];
};
}