about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libxc/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-02-16 18:32:21 +0000
committerAlyssa Ross <hi@alyssa.is>2021-02-16 18:32:21 +0000
commit9becdcc5df71b47a5da84ad670e9a7eae9e0c65a (patch)
tree2ddf0335eb393f89501e3753b50c3f7ab0552d12 /nixpkgs/pkgs/development/libraries/libxc/default.nix
parent49f2a77ac9abc88c253f68952eda26557fc3b555 (diff)
parentff96a0fa5635770390b184ae74debea75c3fd534 (diff)
downloadnixlib-9becdcc5df71b47a5da84ad670e9a7eae9e0c65a.tar
nixlib-9becdcc5df71b47a5da84ad670e9a7eae9e0c65a.tar.gz
nixlib-9becdcc5df71b47a5da84ad670e9a7eae9e0c65a.tar.bz2
nixlib-9becdcc5df71b47a5da84ad670e9a7eae9e0c65a.tar.lz
nixlib-9becdcc5df71b47a5da84ad670e9a7eae9e0c65a.tar.xz
nixlib-9becdcc5df71b47a5da84ad670e9a7eae9e0c65a.tar.zst
nixlib-9becdcc5df71b47a5da84ad670e9a7eae9e0c65a.zip
nixpkgs: merge nixos-unstable
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libxc/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/libxc/default.nix25
1 files changed, 16 insertions, 9 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libxc/default.nix b/nixpkgs/pkgs/development/libraries/libxc/default.nix
index d26518c7de98..0a93babb4599 100644
--- a/nixpkgs/pkgs/development/libraries/libxc/default.nix
+++ b/nixpkgs/pkgs/development/libraries/libxc/default.nix
@@ -1,32 +1,39 @@
-{ lib, stdenv, fetchurl, gfortran, perl }:
+{ lib, stdenv, fetchFromGitLab, cmake, gfortran, perl }:
 
 let
-  version = "4.3.4";
+  version = "5.1.0";
 
 in stdenv.mkDerivation {
   pname = "libxc";
   inherit version;
-  src = fetchurl {
-    url = "http://www.tddft.org/programs/octopus/down.php?file=libxc/${version}/libxc-${version}.tar.gz";
-    sha256 = "0dw356dfwn2bwjdfwwi4h0kimm69aql2f4yk9f2kk4q7qpfkgvm8";
+
+  src = fetchFromGitLab {
+    owner = "libxc";
+    repo = "libxc";
+    rev = version;
+    sha256 = "0qbxh0lfx4cab1fk1qfnx72g4yvs376zqrq74jn224vy32nam2x7";
   };
 
   buildInputs = [ gfortran ];
-  nativeBuildInputs = [ perl ];
+  nativeBuildInputs = [ perl cmake ];
 
   preConfigure = ''
     patchShebangs ./
   '';
 
-  configureFlags = [ "--enable-shared" ];
+  cmakeFlags = [ "-DENABLE_FORTRAN=ON" "-DBUILD_SHARED_LIBS=ON" ];
+
+  preCheck = ''
+    export LD_LIBRARY_PATH=$(pwd)
+  '';
 
   doCheck = true;
   enableParallelBuilding = true;
 
   meta = with lib; {
     description = "Library of exchange-correlation functionals for density-functional theory";
-    homepage = "https://octopus-code.org/wiki/Libxc";
-    license = licenses.lgpl3;
+    homepage = "https://www.tddft.org/programs/Libxc/";
+    license = licenses.mpl20;
     platforms = [ "x86_64-linux" ];
     maintainers = with maintainers; [ markuskowa ];
   };