about summary refs log tree commit diff
path: root/pkgs/by-name/op/openpgl/package.nix
blob: 76e61b6658d6c4ff910e3b5fe1b8fee74a8c6a71 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{ lib
, cmake
, fetchFromGitHub
, ninja
, stdenv
, tbb
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "openpgl";
  version = "0.5.0";

  src = fetchFromGitHub {
    owner = "OpenPathGuidingLibrary";
    repo = "openpgl";
    rev = "v${finalAttrs.version}";
    hash = "sha256-dbHmGGiHQkU0KPpQYpY/o0uCWdb3L5namETdOcOREgs=";
  };

  nativeBuildInputs = [
    cmake
    ninja
  ];

  buildInputs = [
    tbb
  ];

  cmakeFlags = [
    "-DOPENPGL_BUILD_STATIC=OFF"
    "-DTBB_ROOT=${tbb.out}"
  ];

  env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isAarch64 && !stdenv.isDarwin) "-flax-vector-conversions";

  meta = {
    description = "Intel Open Path Guiding Library";
    homepage = "https://github.com/OpenPathGuidingLibrary/openpgl";
    platforms = lib.platforms.unix;
    maintainers = [ lib.maintainers.amarshall ];
    license = lib.licenses.asl20;
  };
})