about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/vmmlib
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/development/libraries/vmmlib
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/vmmlib')
-rw-r--r--nixpkgs/pkgs/development/libraries/vmmlib/default.nix46
-rw-r--r--nixpkgs/pkgs/development/libraries/vmmlib/disable-cpack.patch11
2 files changed, 57 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/vmmlib/default.nix b/nixpkgs/pkgs/development/libraries/vmmlib/default.nix
new file mode 100644
index 000000000000..18b9278539fc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vmmlib/default.nix
@@ -0,0 +1,46 @@
+{ stdenv, fetchFromGitHub, cmake, pkgconfig, boost, blas
+, Accelerate, CoreGraphics, CoreVideo
+}:
+
+stdenv.mkDerivation rec {
+  version = "1.6.2";
+  name = "vmmlib-${version}";
+
+  src = fetchFromGitHub {
+    owner = "VMML";
+    repo = "vmmlib";
+    rev = "release-${version}";
+    sha256 = "0sn6jl1r5k6ka0vkjsdnn14hb95dqq8158dapby6jk72wqj9kdml";
+  };
+
+  patches = [
+    ./disable-cpack.patch   #disable the need of cpack/rpm
+  ];
+
+  nativeBuildInputs = [ pkgconfig cmake ];
+  buildInputs = [ boost blas ]
+    ++ stdenv.lib.optionals stdenv.isDarwin [ Accelerate CoreGraphics CoreVideo ];
+
+  enableParallelBuilding = true;
+
+  doCheck = !stdenv.isDarwin;
+
+  checkTarget = "test";
+
+  meta = with stdenv.lib; {
+    description = "A vector and matrix math library implemented using C++ templates";
+
+    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 
+            often-used 3d and 4d vectors and 3x3 and 4x4 matrices.
+            More advanced functionality include solvers, frustum 
+            computations and frustum culling classes, and spatial data structures'';
+
+    license     = licenses.bsd2;
+    homepage    = https://github.com/VMML/vmmlib/;
+    maintainers = [ maintainers.adev ];
+    platforms   = platforms.all;
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/libraries/vmmlib/disable-cpack.patch b/nixpkgs/pkgs/development/libraries/vmmlib/disable-cpack.patch
new file mode 100644
index 000000000000..8b9a7983a928
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/vmmlib/disable-cpack.patch
@@ -0,0 +1,11 @@
+diff -ur a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt	1970-01-01 00:00:01.000000000 +0000
++++ b/CMakeLists.txt	2016-02-19 08:49:30.053759000 +0000
+@@ -178,6 +178,5 @@
+ install(FILES ${DOCS} DESTINATION share/vmmlib COMPONENT dev)
+ 
+ include(DoxygenRule) # must be after all targets
+-include(CPackConfig)
+ include(CTest)
+-include(PackageConfig)
++