summary refs log tree commit diff
path: root/pkgs/development/libraries/ptex/default.nix
blob: aa17771ec9f2e044db40065d8902b1c6fcd7715b (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
{ stdenv, fetchFromGitHub, zlib, python, cmake }:

stdenv.mkDerivation rec
{
  name = "ptex-${version}";
  version = "2.3.0";

  src = fetchFromGitHub {
    owner = "wdas";
    repo = "ptex";
    rev = "v${version}";
    sha256 = "0nfz0y66bmi6xckn1whi4sfd8i3ibln212fgm4img2z98b6vccyg";
  };

  outputs = [ "bin" "dev" "out" "lib" ];

  buildInputs = [ zlib python cmake ];

  enableParallelBuilding = true;

  buildPhase = ''
      mkdir -p $out

      make prefix=$out

      mkdir -p $bin/bin
      mkdir -p $dev/include
      mkdir -p $lib/lib
      '';

  installPhase = ''
    make install
    mv $out/bin $bin/
  '';

  meta = with stdenv.lib; {
    description = "Per-Face Texture Mapping for Production Rendering";
    homepage = "http://ptex.us/";
    license = licenses.bsd3;
    platforms = platforms.all;
    maintainers = [ maintainers.guibou ];
  };
}