1{ stdenv, fetchFromGitHub, cmake, pkgconfig, boost, blas
2, Accelerate, CoreGraphics, CoreVideo
3}:
4
5stdenv.mkDerivation rec {
6 version = "1.6.2";
7 name = "vmmlib-${version}";
8
9 src = fetchFromGitHub {
10 owner = "VMML";
11 repo = "vmmlib";
12 rev = "release-${version}";
13 sha256 = "0sn6jl1r5k6ka0vkjsdnn14hb95dqq8158dapby6jk72wqj9kdml";
14 };
15
16 patches = [
17 ./disable-cpack.patch #disable the need of cpack/rpm
18 ];
19
20 nativeBuildInputs = [ pkgconfig cmake ];
21 buildInputs = [ boost blas ]
22 ++ stdenv.lib.optionals stdenv.isDarwin [ Accelerate CoreGraphics CoreVideo ];
23
24 enableParallelBuilding = true;
25
26 doCheck = !stdenv.isDarwin;
27
28 checkTarget = "test";
29
30 meta = with stdenv.lib; {
31 description = "A vector and matrix math library implemented using C++ templates";
32
33 longDescription = ''vmmlib is a vector and matrix math library implemented
34 using C++ templates. Its basic functionality includes a vector
35 and a matrix class, with additional functionality for the
36 often-used 3d and 4d vectors and 3x3 and 4x4 matrices.
37 More advanced functionality include solvers, frustum
38 computations and frustum culling classes, and spatial data structures'';
39
40 license = licenses.bsd2;
41 homepage = https://github.com/VMML/vmmlib/;
42 maintainers = [ maintainers.adev ];
43 platforms = platforms.all;
44 };
45}
46