1{ stdenv, fetchFromGitHub, cmake, ninja, pkgconfig, eigen3_3,
2zlib, libpng, boost, qt5, guile
3}:
4
5stdenv.mkDerivation rec {
6 name = "libfive-${version}";
7 version = "2018-07-01";
8
9 src = fetchFromGitHub {
10 owner = "libfive";
11 repo = "libfive";
12 rev = "0f517dde9521d751310a22f85ee69b2c84690267";
13 sha256 = "0bfxysf5f4ripgcv546il8wnw5p0d4s75kdjlwvj32549537hlz0";
14 };
15 nativeBuildInputs = [ cmake ninja pkgconfig ];
16 buildInputs = [ eigen3_3 zlib libpng boost qt5.qtimageformats guile ];
17
18 # Link "Studio" binary to "libfive-studio" to be more obvious:
19 postFixup = ''
20 ln -s "$out/bin/Studio" "$out/bin/libfive-studio"
21 '';
22
23 meta = with stdenv.lib; {
24 description = "Infrastructure for solid modeling with F-Reps in C, C++, and Guile";
25 homepage = https://libfive.com/;
26 maintainers = with maintainers; [ hodapp ];
27 license = licenses.lgpl2;
28 platforms = platforms.linux;
29 };
30}