about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/alglib
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-03-15 10:36:38 +0000
committerAlyssa Ross <hi@alyssa.is>2022-03-16 11:37:19 +0000
commitd435710923ac6e6f9fc155534800745004f2ce93 (patch)
tree386f9401476f96bdc6ec25173a090198942b5d5b /nixpkgs/pkgs/development/libraries/alglib
parentc725f0011e91ae49d351b981690eb66b862b6104 (diff)
parent3239fd2b8f728106491154b44625662e10259af2 (diff)
downloadnixlib-d435710923ac6e6f9fc155534800745004f2ce93.tar
nixlib-d435710923ac6e6f9fc155534800745004f2ce93.tar.gz
nixlib-d435710923ac6e6f9fc155534800745004f2ce93.tar.bz2
nixlib-d435710923ac6e6f9fc155534800745004f2ce93.tar.lz
nixlib-d435710923ac6e6f9fc155534800745004f2ce93.tar.xz
nixlib-d435710923ac6e6f9fc155534800745004f2ce93.tar.zst
nixlib-d435710923ac6e6f9fc155534800745004f2ce93.zip
Merge commit '3239fd2b8f728106491154b44625662e10259af2'
Conflicts:
	nixpkgs/pkgs/applications/window-managers/sway/default.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/alglib')
-rw-r--r--nixpkgs/pkgs/development/libraries/alglib/default.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/alglib/patch-alglib-CMakeLists.patch23
2 files changed, 59 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/alglib/default.nix b/nixpkgs/pkgs/development/libraries/alglib/default.nix
new file mode 100644
index 000000000000..1ff34a8d1f16
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/alglib/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchurl, cmake, clang }:
+
+stdenv.mkDerivation rec {
+  pname = "alglib3";
+  version = "3.18.0";
+
+  src = fetchurl {
+    url = "https://www.alglib.net/translator/re/alglib-${version}.cpp.gpl.tgz";
+    sha256 = "0ag8dvcxzzp9riqvk4lhcbwhvh0lq54lbdnsbyr107rjfi2p1vlq";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    clang
+  ];
+
+  patches = [
+    ./patch-alglib-CMakeLists.patch
+  ];
+
+  meta = with lib; {
+    description = "Numerical analysis and data processing library";
+    homepage = "https://www.alglib.net/";
+    license = lib.licenses.gpl2Plus;
+    maintainers = [ maintainers.paperdigits ];
+    longDescription = ''
+      ALGLIB is a cross-platform numerical analysis and data processing library. It supports several programming languages (C++, C#, Delphi) and several operating systems (Windows and POSIX, including Linux). ALGLIB features include:
+
+      * Data analysis (classification/regression, statistics)
+      * Optimization and nonlinear solvers
+      * Interpolation and linear/nonlinear least-squares fitting
+      * Linear algebra (direct algorithms, EVD/SVD), direct and iterative linear solvers
+      * Fast Fourier Transform and many other algorithms
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/alglib/patch-alglib-CMakeLists.patch b/nixpkgs/pkgs/development/libraries/alglib/patch-alglib-CMakeLists.patch
new file mode 100644
index 000000000000..b91a0c0aefd6
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/alglib/patch-alglib-CMakeLists.patch
@@ -0,0 +1,23 @@
+--- /dev/null
++++ b/CMakeLists.txt
+@@ -0,0 +1,20 @@
++cmake_minimum_required(VERSION 2.8)
++
++project(alglib3 CXX)
++
++file(GLOB_RECURSE sources src/*.cpp)
++file(GLOB_RECURSE headers src/*.h)
++
++add_library(${PROJECT_NAME} STATIC ${sources} ${headers})
++
++install(
++  TARGETS ${PROJECT_NAME}
++  RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
++  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++  ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++)
++
++install(
++  FILES ${headers}
++  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alglib
++)