depot/third_party/nixpkgs/pkgs/development/libraries/level-zero/default.nix
Default email 587713944a Project import generated by Copybara.
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
2024-04-21 17:54:59 +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.14";
src = fetchFromGitHub {
owner = "oneapi-src";
repo = "level-zero";
rev = "refs/tags/v${version}";
hash = "sha256-kMXxPfKL7HsQAkdyDGiuSITJ2WtOes8pJ92sWg7JkgM=";
};
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 ];
};
}