depot/third_party/nixpkgs/pkgs/development/libraries/level-zero/default.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

45 lines
941 B
Nix

{ lib
, addOpenGLRunpath
, cmake
, fetchFromGitHub
, fmt_9
, spdlog
, stdenv
, substituteAll
}:
stdenv.mkDerivation rec {
pname = "level-zero";
version = "1.16.15";
src = fetchFromGitHub {
owner = "oneapi-src";
repo = "level-zero";
rev = "refs/tags/v${version}";
hash = "sha256-J+XIqaV1ThD0RqqcyIkzvTWCkIztjkHzGzUbj0qojJs=";
};
patches = [
(substituteAll {
src = ./system-spdlog.diff;
spdlog = lib.getDev spdlog;
})
];
nativeBuildInputs = [ cmake addOpenGLRunpath ];
buildInputs = [ fmt_9 ];
postFixup = ''
addOpenGLRunpath $out/lib/libze_loader.so
'';
meta = with lib; {
description = "oneAPI Level Zero Specification Headers and Loader";
homepage = "https://github.com/oneapi-src/level-zero";
changelog = "https://github.com/oneapi-src/level-zero/blob/v${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = [ maintainers.ziguana ];
};
}