about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libxc
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libxc')
-rw-r--r--nixpkgs/pkgs/development/libraries/libxc/default.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libxc/default.nix b/nixpkgs/pkgs/development/libraries/libxc/default.nix
new file mode 100644
index 000000000000..12fd972b8719
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libxc/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchurl, gfortran, perl }:
+
+let
+  version = "4.3.4";
+
+in stdenv.mkDerivation {
+  name = "libxc-${version}";
+  src = fetchurl {
+    url = "http://www.tddft.org/programs/octopus/down.php?file=libxc/${version}/libxc-${version}.tar.gz";
+    sha256 = "0dw356dfwn2bwjdfwwi4h0kimm69aql2f4yk9f2kk4q7qpfkgvm8";
+  };
+
+  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 = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ markuskowa ];
+  };
+}