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