2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, boost165, pkg-config, guile,
|
2021-07-27 15:35:15 +02:00
|
|
|
eigen, libpng, python3, libGLU, qt4, openexr, openimageio,
|
2021-06-24 02:33:50 +02:00
|
|
|
opencolorio_1, xercesc, ilmbase, osl, seexpr, makeWrapper
|
2018-06-20 20:42:10 +02:00
|
|
|
}:
|
|
|
|
|
2018-07-20 20:00:01 +02:00
|
|
|
let boost_static = boost165.override {
|
|
|
|
enableStatic = true;
|
|
|
|
enablePython = true;
|
2021-07-27 15:35:15 +02:00
|
|
|
python = python3;
|
2018-07-20 20:00:01 +02:00
|
|
|
};
|
2018-06-20 20:42:10 +02:00
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "appleseed";
|
2019-04-20 21:32:57 +02:00
|
|
|
version = "2.0.5-beta";
|
2018-06-20 20:42:10 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "appleseedhq";
|
|
|
|
repo = "appleseed";
|
2019-04-20 21:32:57 +02:00
|
|
|
rev = version;
|
|
|
|
sha256 = "1sq9s0rzjksdn8ayp1g17gdqhp7fqks8v1ddd3i5rsl96b04fqx5";
|
2018-06-20 20:42:10 +02:00
|
|
|
};
|
2020-12-31 08:48:55 +01:00
|
|
|
nativeBuildInputs = [ cmake pkg-config makeWrapper ];
|
2018-06-20 20:42:10 +02:00
|
|
|
buildInputs = [
|
2021-07-27 15:35:15 +02:00
|
|
|
boost_static guile eigen libpng python3
|
2021-06-24 02:33:50 +02:00
|
|
|
libGLU qt4 openexr openimageio opencolorio_1 xercesc
|
2020-12-31 08:48:55 +01:00
|
|
|
osl seexpr
|
2018-06-20 20:42:10 +02:00
|
|
|
];
|
|
|
|
|
2019-10-30 01:40:49 +01:00
|
|
|
NIX_CFLAGS_COMPILE = toString [
|
2019-09-10 00:14:34 +02:00
|
|
|
"-I${openexr.dev}/include/OpenEXR"
|
|
|
|
"-I${ilmbase.dev}/include/OpenEXR"
|
|
|
|
"-I${openimageio.dev}/include/OpenImageIO"
|
|
|
|
|
|
|
|
"-Wno-unused-but-set-variable"
|
|
|
|
"-Wno-error=class-memaccess"
|
|
|
|
"-Wno-error=maybe-uninitialized"
|
|
|
|
"-Wno-error=catch-value"
|
2019-11-07 01:09:08 +01:00
|
|
|
"-Wno-error=stringop-truncation"
|
2019-09-10 00:14:34 +02:00
|
|
|
];
|
2018-06-20 20:42:10 +02:00
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DUSE_EXTERNAL_XERCES=ON" "-DUSE_EXTERNAL_OCIO=ON" "-DUSE_EXTERNAL_OIIO=ON"
|
|
|
|
"-DUSE_EXTERNAL_OSL=ON" "-DWITH_CLI=ON" "-DWITH_STUDIO=ON" "-DWITH_TOOLS=ON"
|
|
|
|
"-DUSE_EXTERNAL_PNG=ON" "-DUSE_EXTERNAL_ZLIB=ON"
|
|
|
|
"-DUSE_EXTERNAL_EXR=ON" "-DUSE_EXTERNAL_SEEXPR=ON"
|
2018-07-20 20:00:01 +02:00
|
|
|
"-DWITH_PYTHON=ON"
|
2018-06-20 20:42:10 +02:00
|
|
|
"-DWITH_DISNEY_MATERIAL=ON"
|
|
|
|
"-DUSE_SSE=ON"
|
|
|
|
"-DUSE_SSE42=ON"
|
|
|
|
];
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-06-20 20:42:10 +02:00
|
|
|
description = "Open source, physically-based global illumination rendering engine";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://appleseedhq.net/";
|
2018-06-20 20:42:10 +02:00
|
|
|
maintainers = with maintainers; [ hodapp ];
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
2018-07-20 20:00:01 +02:00
|
|
|
|
|
|
|
# Work around a bug in the CMake build:
|
|
|
|
postInstall = ''
|
|
|
|
chmod a+x $out/bin/*
|
2021-07-27 15:35:15 +02:00
|
|
|
wrapProgram $out/bin/appleseed.studio --set PYTHONHOME ${python3}
|
2018-07-20 20:00:01 +02:00
|
|
|
'';
|
2018-06-20 20:42:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
# TODO: Is the below problematic?
|
|
|
|
|
|
|
|
# CMake Warning (dev) at /nix/store/dsyw2zla2h3ld2p0jj4cv0j3wal1bp3h-cmake-3.11.2/share/cmake-3.11/Modules/FindOpenGL.cmake:270 (message):
|
|
|
|
# Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
|
|
|
|
# available. Run "cmake --help-policy CMP0072" for policy details. Use the
|
|
|
|
# cmake_policy command to set the policy and suppress this warning.
|
|
|
|
#
|
|
|
|
# FindOpenGL found both a legacy GL library:
|
|
|
|
#
|
|
|
|
# OPENGL_gl_LIBRARY: /nix/store/yxrgmcz2xlgn113wz978a91qbsy4rc8g-libGL-1.0.0/lib/libGL.so
|
|
|
|
#
|
|
|
|
# and GLVND libraries for OpenGL and GLX:
|
|
|
|
#
|
|
|
|
# OPENGL_opengl_LIBRARY: /nix/store/yxrgmcz2xlgn113wz978a91qbsy4rc8g-libGL-1.0.0/lib/libOpenGL.so
|
|
|
|
# OPENGL_glx_LIBRARY: /nix/store/yxrgmcz2xlgn113wz978a91qbsy4rc8g-libGL-1.0.0/lib/libGLX.so
|
|
|
|
#
|
|
|
|
# OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
|
|
|
|
# compatibility with CMake 3.10 and below the legacy GL library will be used.
|