diff options
author | Chris Ostrouchov <chris.ostrouchov@gmail.com> | 2018-09-11 16:41:17 -0400 |
---|---|---|
committer | Chris Ostrouchov <chris.ostrouchov@gmail.com> | 2018-09-14 15:40:14 -0400 |
commit | 2c7295ebe09d556f786b330eeadfbc2e187e6f02 (patch) | |
tree | ba43d506d67d2b889b91eb35ff45a418ea4b1be7 | |
parent | 768c4f637aa11d517c35f0e79270b71d4f2e65b9 (diff) |
quantum-espresso: init at 6.3
-rw-r--r-- | pkgs/applications/science/chemistry/quantum-espresso/default.nix | 49 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 6 |
2 files changed, 55 insertions, 0 deletions
diff --git a/pkgs/applications/science/chemistry/quantum-espresso/default.nix b/pkgs/applications/science/chemistry/quantum-espresso/default.nix new file mode 100644 index 000000000000..7a7f1b3596d3 --- /dev/null +++ b/pkgs/applications/science/chemistry/quantum-espresso/default.nix @@ -0,0 +1,49 @@ +{ stdenv, fetchurl +, gfortran, fftw, openblas +, mpi ? null +}: + +stdenv.mkDerivation rec { + version = "6.3"; + name = "quantum-espresso-${version}"; + + src = fetchurl { + url = "https://gitlab.com/QEF/q-e/-/archive/qe-${version}/q-e-qe-${version}.tar.gz"; + sha256 = "1738z3nhkzcrgnhnfg1r4lipbwvcrcprwhzjbjysnylmzbzwhrs0"; + }; + + passthru = { + inherit mpi; + }; + + preConfigure = '' + patchShebangs configure + ''; + + # remove after 6.3 version: + # makefile needs to ignore install directory easier than applying patch + preInstall = '' + printf "\n.PHONY: install\n" >> Makefile + ''; + + buildInputs = [ fftw openblas gfortran ] + ++ (stdenv.lib.optionals (mpi != null) [ mpi ]); + +configureFlags = if (mpi != null) then [ "LD=${mpi}/bin/mpif90" ] else [ "LD=${gfortran}/bin/gfortran" ]; + + makeFlags = [ "all" ]; + + meta = with stdenv.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. + ''; + homepage = https://www.quantum-espresso.org/; + license = licenses.gpl2; + platforms = [ "x86_64-linux" ]; + maintainers = [ maintainers.costrouc ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 416ec54a2318..af45c2ec462b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20625,6 +20625,12 @@ with pkgs; pymol = callPackage ../applications/science/chemistry/pymol { }; + quantum-espresso = callPackage ../applications/science/chemistry/quantum-espresso { }; + + quantum-espresso-mpi = callPackage ../applications/science/chemistry/quantum-espresso { + mpi = openmpi; + }; + ### SCIENCE/GEOMETRY drgeo = callPackage ../applications/science/geometry/drgeo { |