about summary refs log tree commit diff
path: root/pkgs/applications/science/chemistry/quantum-espresso
diff options
context:
space:
mode:
authorFelix Buehler <account@buehler.rocks>2021-09-15 23:13:57 +0200
committerFelix Buehler <account@buehler.rocks>2021-09-15 23:13:57 +0200
commit64bac8e8740de4cb1cba2edd8db86459a7960cd2 (patch)
tree99abfc78e20552d78f195f6bb0bf5c6ccccd71ce /pkgs/applications/science/chemistry/quantum-espresso
parent284c97a695071b31019e164ba49deccf321cb87e (diff)
quantum-espresso: switch to fetchFromGitLab
Diffstat (limited to 'pkgs/applications/science/chemistry/quantum-espresso')
-rw-r--r--pkgs/applications/science/chemistry/quantum-espresso/default.nix29
1 files changed, 18 insertions, 11 deletions
diff --git a/pkgs/applications/science/chemistry/quantum-espresso/default.nix b/pkgs/applications/science/chemistry/quantum-espresso/default.nix
index a348c51c28156..6889aec535776 100644
--- a/pkgs/applications/science/chemistry/quantum-espresso/default.nix
+++ b/pkgs/applications/science/chemistry/quantum-espresso/default.nix
@@ -1,5 +1,10 @@
-{ lib, stdenv, fetchurl
-, gfortran, fftw, blas, lapack
+{ lib
+, stdenv
+, fetchFromGitLab
+, gfortran
+, fftw
+, blas
+, lapack
 , useMpi ? false
 , mpi
 }:
@@ -8,9 +13,11 @@ stdenv.mkDerivation rec {
   version = "6.6";
   pname = "quantum-espresso";
 
-  src = fetchurl {
-    url = "https://gitlab.com/QEF/q-e/-/archive/qe-${version}/q-e-qe-${version}.tar.gz";
-    sha256 = "0b3718bwdqfyssyz25jknijar79qh5cf1bbizv9faliz135mcilj";
+  src = fetchFromGitLab {
+    owner = "QEF";
+    repo = "q-e";
+    rev = "qe-${version}";
+    sha256 = "1mkfmw0fq1dabplzdn6v1abhw0ds55gzlvbx3a9brv493whk21yp";
   };
 
   passthru = {
@@ -24,18 +31,18 @@ stdenv.mkDerivation rec {
   buildInputs = [ fftw blas lapack gfortran ]
     ++ (lib.optionals useMpi [ mpi ]);
 
-configureFlags = if useMpi then [ "LD=${mpi}/bin/mpif90" ] else [ "LD=${gfortran}/bin/gfortran" ];
+  configureFlags = if useMpi then [ "LD=${mpi}/bin/mpif90" ] else [ "LD=${gfortran}/bin/gfortran" ];
 
   makeFlags = [ "all" ];
 
   meta = with lib; {
     description = "Electronic-structure calculations and materials modeling at the nanoscale";
     longDescription = ''
-        Quantum ESPRESSO is an integrated suite of Open-Source computer codes for
-        electronic-structure calculations and materials modeling at the
-        nanoscale. It is based on density-functional theory, plane waves, and
-        pseudopotentials.
-      '';
+      Quantum ESPRESSO is an integrated suite of Open-Source computer codes for
+      electronic-structure calculations and materials modeling at the
+      nanoscale. It is based on density-functional theory, plane waves, and
+      pseudopotentials.
+    '';
     homepage = "https://www.quantum-espresso.org/";
     license = licenses.gpl2;
     platforms = [ "x86_64-linux" "x86_64-darwin" ];