about summary refs log tree commit diff
path: root/pkgs/development/libraries/science/chemistry/harminv
diff options
context:
space:
mode:
authorPhillip Seeber2023-02-06 17:10:55 +0100
committerPhillip Seeber2023-02-08 11:28:32 +0100
commit09d1372cb900186ac865132b1ac6f0125c4026fd (patch)
tree7bfc6938fbbb05d101228ccad5599fc00a88901f /pkgs/development/libraries/science/chemistry/harminv
parent00bdf78a02762dae07c77ff9b29158e5149c994a (diff)
harminv: init at 1.4.2
Diffstat (limited to 'pkgs/development/libraries/science/chemistry/harminv')
-rw-r--r--pkgs/development/libraries/science/chemistry/harminv/default.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/development/libraries/science/chemistry/harminv/default.nix b/pkgs/development/libraries/science/chemistry/harminv/default.nix
new file mode 100644
index 000000000000..54c0d03979ab
--- /dev/null
+++ b/pkgs/development/libraries/science/chemistry/harminv/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, gfortran
+, blas
+, lapack
+}:
+
+assert !blas.isILP64;
+assert !lapack.isILP64;
+
+stdenv.mkDerivation rec {
+  pname = "harminv";
+  version = "1.4.2";
+
+  src = fetchFromGitHub {
+    owner = "NanoComp";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-EXEt7l69etcBdDdEDlD1ODOdhTBZCVjgY1jhRUDd/W0=";
+  };
+
+  # File is missing in the git checkout but required by autotools
+  postPatch = ''
+    touch ChangeLog
+  '';
+
+  nativeBuildInputs = [ autoreconfHook gfortran ];
+
+  buildInputs = [ blas lapack ];
+
+  configureFlags = [ "--enable-shared" ];
+
+  meta = with lib; {
+    description = "Harmonic inversion algorithm of Mandelshtam: decompose signal into sum of decaying sinusoids";
+    homepage = "https://github.com/NanoComp/harminv";
+    license = with licenses; [ gpl2Only ];
+    maintainers = with maintainers; [ sheepforce markuskowa ];
+    platforms = platforms.linux;
+  };
+}