2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, boost, lapack
|
2017-09-21 20:51:32 +01:00
|
|
|
, Accelerate, CoreGraphics, CoreVideo
|
|
|
|
}:
|
2016-02-18 22:39:18 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "1.6.2";
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "vmmlib";
|
2016-02-18 22:39:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "VMML";
|
|
|
|
repo = "vmmlib";
|
|
|
|
rev = "release-${version}";
|
|
|
|
sha256 = "0sn6jl1r5k6ka0vkjsdnn14hb95dqq8158dapby6jk72wqj9kdml";
|
|
|
|
};
|
|
|
|
|
2017-09-21 20:51:32 +01:00
|
|
|
patches = [
|
|
|
|
./disable-cpack.patch #disable the need of cpack/rpm
|
|
|
|
];
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config cmake ];
|
2020-09-20 18:29:05 +01:00
|
|
|
buildInputs = [ boost lapack ]
|
2021-01-21 17:00:13 +00:00
|
|
|
++ lib.optionals stdenv.isDarwin [ Accelerate CoreGraphics CoreVideo ];
|
2017-09-21 20:51:32 +01:00
|
|
|
|
|
|
|
doCheck = !stdenv.isDarwin;
|
2016-02-18 22:39:18 +00:00
|
|
|
|
|
|
|
checkTarget = "test";
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2016-02-18 22:39:18 +00:00
|
|
|
description = "A vector and matrix math library implemented using C++ templates";
|
|
|
|
|
2020-09-20 18:29:05 +01:00
|
|
|
longDescription = ''vmmlib is a vector and matrix math library implemented
|
|
|
|
using C++ templates. Its basic functionality includes a vector
|
|
|
|
and a matrix class, with additional functionality for the
|
2016-02-18 22:39:18 +00:00
|
|
|
often-used 3d and 4d vectors and 3x3 and 4x4 matrices.
|
2020-09-20 18:29:05 +01:00
|
|
|
More advanced functionality include solvers, frustum
|
2016-02-18 22:39:18 +00:00
|
|
|
computations and frustum culling classes, and spatial data structures'';
|
|
|
|
|
|
|
|
license = licenses.bsd2;
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/VMML/vmmlib/";
|
2016-02-18 22:39:18 +00:00
|
|
|
maintainers = [ maintainers.adev ];
|
|
|
|
platforms = platforms.all;
|
2017-09-21 20:51:32 +01:00
|
|
|
};
|
2016-02-18 22:39:18 +00:00
|
|
|
}
|