summary refs log tree commit diff
path: root/pkgs/development/libraries/libxc/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/libxc/default.nix')
-rw-r--r--pkgs/development/libraries/libxc/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libxc/default.nix b/pkgs/development/libraries/libxc/default.nix
new file mode 100644
index 000000000000..925c1b6d083d
--- /dev/null
+++ b/pkgs/development/libraries/libxc/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl, gfortran, perl }:
+
+let
+  version = "2.2.3";
+in stdenv.mkDerivation {
+  name = "libxc-${version}";
+  src = fetchurl {
+    url = "http://www.tddft.org/programs/octopus/down.php?file=libxc/libxc-${version}.tar.gz";
+    sha256 = "1rv8vsf7zzw0g7j93rqcipzhk2pj1iq71bpkwf7zxivmgavh0arg";
+  };
+
+  buildInputs = [ gfortran ];
+  nativeBuildInputs = [ perl ];
+
+  preConfigure = ''
+    patchShebangs ./
+  '';
+
+  configureFlags = [ "--enable-shared" ];
+
+  doCheck = true;
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "Library of exchange-correlation functionals for density-functional theory";
+    homepage = http://octopus-code.org/wiki/Libxc;
+    license = licenses.lgpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ markuskowa ];
+  };
+}