1{ stdenv, lib, fetchFromGitHub, cmake, pkgconfig, doxygen, libGL, glew
2, xorg , ffmpeg, python3 , libjpeg, libpng, libtiff, eigen
3, Carbon ? null, Cocoa ? null
4}:
5
6stdenv.mkDerivation rec {
7 name = "pangolin-${version}";
8
9 version = "2017-08-02";
10
11 src = fetchFromGitHub {
12 owner = "stevenlovegrove";
13 repo = "Pangolin";
14 rev = "f05a8cdc4f0e32cc1664a430f1f85e60e233c407";
15 sha256 = "0pfbaarlsw7f7cmsppm7m13nz0k530wwwyczy2l9k448p3v7x9j0";
16 };
17
18 nativeBuildInputs = [ cmake pkgconfig doxygen ];
19
20 buildInputs = [
21 libGL
22 glew
23 xorg.libX11
24 ffmpeg
25 python3
26 libjpeg
27 libpng
28 libtiff
29 eigen
30 ]
31 ++ lib.optionals stdenv.isDarwin [ Carbon Cocoa ];
32
33 enableParallelBuilding = true;
34
35 # The tests use cmake's findPackage to find the installed version of
36 # pangolin, which isn't what we want (or available).
37 doCheck = false;
38 cmakeFlags = [ "-DBUILD_TESTS=OFF" ];
39
40 meta = {
41 description = "A lightweight portable rapid development library for managing OpenGL display / interaction and abstracting video input";
42 longDescription = ''
43 Pangolin is a lightweight portable rapid development library for managing
44 OpenGL display / interaction and abstracting video input. At its heart is
45 a simple OpenGl viewport manager which can help to modularise 3D
46 visualisation without adding to its complexity, and offers an advanced
47 but intuitive 3D navigation handler. Pangolin also provides a mechanism
48 for manipulating program variables through config files and ui
49 integration, and has a flexible real-time plotter for visualising
50 graphical data.
51 '';
52 homepage = https://github.com/stevenlovegrove/Pangolin;
53 license = stdenv.lib.licenses.mit;
54 maintainers = [ stdenv.lib.maintainers.expipiplus1 ];
55 platforms = stdenv.lib.platforms.all;
56 };
57}