about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/blitz/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-09-13 11:53:06 +0000
committerAlyssa Ross <hi@alyssa.is>2021-09-13 17:18:49 +0000
commitc3e005913d59b8ad64004e60888a71816688af1f (patch)
treef65b32f0d16acaa40f2ee82ac736d150de4b6cf5 /nixpkgs/pkgs/development/libraries/blitz/default.nix
parent1c8034da05499ca3d999f57ba1f6b235e7711ee1 (diff)
parentdb88608d8c811a93b74c99cfa1224952afc78200 (diff)
downloadnixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar
nixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar.gz
nixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar.bz2
nixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar.lz
nixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar.xz
nixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar.zst
nixlib-c3e005913d59b8ad64004e60888a71816688af1f.zip
Merge commit 'db88608d8c811a93b74c99cfa1224952afc78200'
Conflicts:
	nixpkgs/nixos/modules/config/update-users-groups.pl
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/blitz/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/blitz/default.nix67
1 files changed, 67 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/blitz/default.nix b/nixpkgs/pkgs/development/libraries/blitz/default.nix
new file mode 100644
index 000000000000..f47b051caadf
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/blitz/default.nix
@@ -0,0 +1,67 @@
+{ stdenv, lib, fetchFromGitHub, pkg-config, gfortran, texinfo, python, boost
+# Select SIMD alignment width (in bytes) for vectorization.
+, simdWidth ? 1
+# Pad arrays to simdWidth by default?
+# Note: Only useful if simdWidth > 1
+, enablePadding ? false
+# Activate serialization through Boost.Serialize?
+, enableSerialization ? true
+# Activate test-suite?
+# WARNING: Some of the tests require up to 1700MB of memory to compile.
+, doCheck ? true
+}:
+
+let
+  inherit (lib) optional optionals;
+in
+stdenv.mkDerivation rec {
+  pname = "blitz++";
+  version = "1.0.1";
+
+  src = fetchFromGitHub {
+    owner = "blitzpp";
+    repo = "blitz";
+    rev = "1.0.1";
+    sha256 = "0nq84vwvvbq7m0my6h835ijfw53bxdp42qjc6kjhk436888qy9rh";
+  };
+
+  nativeBuildInputs = [ pkg-config python texinfo ];
+  buildInputs = [ gfortran texinfo boost ];
+
+  configureFlags =
+    [ "--enable-shared"
+      "--disable-static"
+      "--enable-fortran"
+      "--enable-optimize"
+      "--with-pic=yes"
+      "--enable-html-docs"
+      "--disable-doxygen"
+      "--disable-dot"
+      "--disable-latex-docs"
+      "--enable-simd-width=${toString simdWidth}"
+      "--with-boost=${boost.dev}"
+      "--with-boost-libdir=${boost.out}/lib"
+    ] ++ optional enablePadding "--enable-array-length-padding"
+    ++ optional enableSerialization "--enable-serialization"
+    ++ optional stdenv.is64bit "--enable-64bit";
+
+  enableParallelBuilding = true;
+
+  inherit doCheck;
+  checkTarget = "check-testsuite check-examples";
+
+  meta = with lib; {
+    description = "Fast multi-dimensional array library for C++";
+    homepage = https://sourceforge.net/projects/blitz/;
+    license = licenses.lgpl3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ ToxicFrog ];
+    longDescription = ''
+      Blitz++ is a C++ class library for scientific computing which provides
+      performance on par with Fortran 77/90. It uses template techniques to
+      achieve high performance. Blitz++ provides dense arrays and vectors,
+      random number generators, and small vectors (useful for representing
+      multicomponent or vector fields).
+    '';
+  };
+}