about summary refs log tree commit diff
path: root/pkgs/applications/science
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2018-02-10 14:14:01 +0000
committerGitHub <noreply@github.com>2018-02-10 14:14:01 +0000
commita0a3f674a717f485de187a8ea59afcd407055253 (patch)
tree1ab31bab8c74d65f15a499818798b84a6b8b4e61 /pkgs/applications/science
parentfec3788753ecf106491ff815ca717987eb0dae26 (diff)
parentec6e7c6eeb9b0da80dead84afe3a935e89d26fa0 (diff)
downloadnixlib-a0a3f674a717f485de187a8ea59afcd407055253.tar
nixlib-a0a3f674a717f485de187a8ea59afcd407055253.tar.gz
nixlib-a0a3f674a717f485de187a8ea59afcd407055253.tar.bz2
nixlib-a0a3f674a717f485de187a8ea59afcd407055253.tar.lz
nixlib-a0a3f674a717f485de187a8ea59afcd407055253.tar.xz
nixlib-a0a3f674a717f485de187a8ea59afcd407055253.tar.zst
nixlib-a0a3f674a717f485de187a8ea59afcd407055253.zip
Merge pull request #34094 from markuskowa/octopus-pr
octopus: init at 7.2
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r--pkgs/applications/science/chemistry/octopus/default.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/applications/science/chemistry/octopus/default.nix b/pkgs/applications/science/chemistry/octopus/default.nix
new file mode 100644
index 000000000000..2ff20fef40e8
--- /dev/null
+++ b/pkgs/applications/science/chemistry/octopus/default.nix
@@ -0,0 +1,47 @@
+{ stdenv, fetchurl, symlinkJoin, gfortran, perl, procps
+, libyaml, libxc, fftw, openblas, gsl
+}:
+
+let
+  version = "7.2";
+  fftwAll = symlinkJoin { name ="ftw-dev-out"; paths = [ fftw.dev fftw.out ]; };
+
+in stdenv.mkDerivation {
+  name = "octopus-${version}";
+
+  src = fetchurl {
+    url = "http://www.tddft.org/programs/octopus/down.php?file=${version}/octopus-${version}.tar.gz";
+    sha256 = "03zzmq72zdnjkhifbmlxs7ig7x6sf6mv8zv9mxhakm9hzwa9yn7m";
+  };
+
+  nativeBuildInputs = [ perl procps fftw.dev ];
+  buildInputs = [ libyaml gfortran libxc openblas gsl fftw.out ];
+
+  configureFlags = ''
+    --with-yaml-prefix=${libyaml}
+    --with-blas=-lopenblas
+    --with-lapack=-lopenblas
+    --with-fftw-prefix=${fftwAll}
+    --with-gsl-prefix=${gsl}
+    --with-libxc-prefix=${libxc}
+  '';
+
+  doCheck = false;
+  checkTarget = "check-short";
+
+  postPatch = ''
+    patchShebangs ./
+  '';
+
+  postConfigure = ''
+    patchShebangs testsuite/oct-run_testsuite.sh
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Real-space time dependent density-functional theory code";
+    homepage = http://octopus-code.org;
+    maintainers = with maintainers; [ markuskowa ];
+    license = licenses.gpl2;
+    platforms = [ "x86_64-linux" ];
+  };
+}