diff options
author | Guillaume Bouchard <guillaum.bouchard@gmail.com> | 2017-09-17 22:16:04 +0200 |
---|---|---|
committer | Guillaume Bouchard <guillaum.bouchard@gmail.com> | 2017-10-18 11:57:10 +0200 |
commit | 3cbecaadc21e20ae54b347534b88b9566380b077 (patch) | |
tree | fc8ccc57945b1934b76c79ae25ca985aa59721ef /pkgs/development/libraries/partio | |
parent | db6e674bc8b078a9f540e3cecc9482b45e9f1ff1 (diff) |
partio: init at 1.1.0
Diffstat (limited to 'pkgs/development/libraries/partio')
-rw-r--r-- | pkgs/development/libraries/partio/default.nix | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/pkgs/development/libraries/partio/default.nix b/pkgs/development/libraries/partio/default.nix new file mode 100644 index 0000000000000..ed0f38f8538bb --- /dev/null +++ b/pkgs/development/libraries/partio/default.nix @@ -0,0 +1,52 @@ +{ stdenv, fetchFromGitHub, unzip, cmake, freeglut, mesa, zlib, swig, python, doxygen, xorg }: + +stdenv.mkDerivation rec +{ + name = "partio-${version}"; + version = "1.1.0"; + + src = fetchFromGitHub { + owner = "wdas"; + repo = "partio"; + rev = "v${version}"; + sha256 = "0z7n5ay21ca7g7xb80v6jmr96x9k7vm7zawawvmx71yj32rg1n34"; + }; + + outputs = [ "dev" "out" "lib" ]; + + buildInputs = [ unzip cmake freeglut mesa zlib swig python doxygen xorg.libXi xorg.libXmu ]; + + sourceRoot = "partio-v${version}-src"; + + enableParallelBuilding = true; + + buildPhase = '' + sed 's/ADD_LIBRARY (partio /ADD_LIBRARY (partio SHARED /' -i ../src/lib/CMakeLists.txt + CXXFLAGS="-std=c++11" cmake . + make partio + + mkdir $dev + mkdir -p $lib/lib + mkdir $out + ''; + + # TODO: + # Sexpr support + + installPhase = '' + mkdir $dev/lib + mkdir -p $dev/include/partio + + mv lib/libpartio.so $lib/lib + + mv ../src/lib/* $dev/include/partio + ''; + + meta = with stdenv.lib; { + description = "C++ (with python bindings) library for easily reading/writing/manipulating common animation particle formats such as PDB, BGEO, PTC"; + homepage = "https://www.disneyanimation.com/technology/partio.html"; + license = licenses.bsd3; + platforms = platforms.all; + maintainers = [ maintainers.guibou ]; + }; +} |