btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / op / openpgl / package.nix
blob556d9170df491ca142f3ff09decd2f03cd58a9f3
1 { lib
2 , cmake
3 , fetchFromGitHub
4 , ninja
5 , stdenv
6 , tbb
7 }:
9 stdenv.mkDerivation (finalAttrs: {
10   pname = "openpgl";
11   version = "0.7.0";
13   src = fetchFromGitHub {
14     owner = "OpenPathGuidingLibrary";
15     repo = "openpgl";
16     rev = "v${finalAttrs.version}";
17     hash = "sha256-HX3X1dmOazUUiYCqa6irpNm37YthB2YHb8u1P1qDHco=";
18   };
20   nativeBuildInputs = [
21     cmake
22     ninja
23   ];
25   buildInputs = [
26     tbb
27   ];
29   cmakeFlags = [
30     "-DOPENPGL_BUILD_STATIC=OFF"
31     "-DTBB_ROOT=${tbb.out}"
32   ];
34   env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.hostPlatform.isAarch64 && !stdenv.hostPlatform.isDarwin) "-flax-vector-conversions";
36   meta = {
37     description = "Intel Open Path Guiding Library";
38     homepage = "https://github.com/OpenPathGuidingLibrary/openpgl";
39     platforms = lib.platforms.unix;
40     maintainers = [ lib.maintainers.amarshall ];
41     license = lib.licenses.asl20;
42   };