about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/op/openpgl/package.nix
blob: ed81711d8f5da88386b6aeeadde76069ef601a22 (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 = finalAttrs.pname;
    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 "-flax-vector-conversions";

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