summary refs log tree commit diff
diff options
context:
space:
mode:
authorB. Kelly <bk@ancilla.ca>2019-08-03 22:53:09 -0400
committerRebecca Kelly <btk@google.com>2021-08-28 16:23:31 -0400
commit10005589c301e9f2168492491b2748ebdda49b57 (patch)
tree405e825329de3b1bccf93d8c0d03ec13ce1f8382
parent978e73e5f4a589126ab0e260479d791f3fdc6d18 (diff)
downloadnixpkgs-10005589c301e9f2168492491b2748ebdda49b57.tar
nixpkgs-10005589c301e9f2168492491b2748ebdda49b57.tar.gz
nixpkgs-10005589c301e9f2168492491b2748ebdda49b57.tar.bz2
nixpkgs-10005589c301e9f2168492491b2748ebdda49b57.tar.lz
nixpkgs-10005589c301e9f2168492491b2748ebdda49b57.tar.xz
nixpkgs-10005589c301e9f2168492491b2748ebdda49b57.tar.zst
nixpkgs-10005589c301e9f2168492491b2748ebdda49b57.zip
blitz: reinstate at 1.0.1
-rw-r--r--pkgs/development/libraries/blitz/default.nix67
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 69 insertions, 0 deletions
diff --git a/pkgs/development/libraries/blitz/default.nix b/pkgs/development/libraries/blitz/default.nix
new file mode 100644
index 00000000000..f47b051caad
--- /dev/null
+++ b/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).
+    '';
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index c7bc556b612..5b2fb5af3ca 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1971,6 +1971,8 @@ in
 
   blink = libsForQt5.callPackage ../applications/networking/instant-messengers/blink { };
 
+  blitz = callPackage ../development/libraries/blitz { };
+
   blockbook = callPackage ../servers/blockbook { };
 
   blockhash = callPackage ../tools/graphics/blockhash { };