From b908b7d68d17d872cd5befa30a69f0844e0d48fa Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 2 Aug 2018 00:16:11 +0200 Subject: [PATCH 1/2] globalarrays: init at 5.7 --- .../libraries/globalarrays/default.nix | 42 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/development/libraries/globalarrays/default.nix diff --git a/pkgs/development/libraries/globalarrays/default.nix b/pkgs/development/libraries/globalarrays/default.nix new file mode 100644 index 000000000000..2da5474eb9d1 --- /dev/null +++ b/pkgs/development/libraries/globalarrays/default.nix @@ -0,0 +1,42 @@ +{ stdenv, pkgs, fetchFromGitHub, automake, autoconf, libtool +, openblas, gfortran, openssh, openmpi +} : + +let + version = "5.7"; + +in stdenv.mkDerivation { + name = "globalarrays-${version}"; + + src = fetchFromGitHub { + owner = "GlobalArrays"; + repo = "ga"; + rev = "v${version}"; + sha256 = "07i2idaas7pq3in5mdqq5ndvxln5q87nyfgk3vzw85r72c4fq5jh"; + }; + + nativeBuildInputs = [ automake autoconf libtool ]; + buildInputs = [ openmpi openblas gfortran openssh ]; + + preConfigure = '' + autoreconf -ivf + configureFlagsArray+=( "--enable-i8" \ + "--with-mpi" \ + "--with-mpi3" \ + "--enable-eispack" \ + "--enable-underscoring" \ + "--with-blas8=${openblas}/lib -lopenblas" ) + ''; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + description = "Global Arrays Programming Models"; + homepage = http://hpc.pnl.gov/globalarrays/; + maintainers = [ maintainers.markuskowa ]; + license = licenses.bsd3; + platforms = platforms.linux; + }; +} + + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 42d38772772c..5b179ef8490e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1314,6 +1314,8 @@ with pkgs; glide = callPackage ../development/tools/glide { }; + globalarrays = callPackage ../development/libraries/globalarrays { }; + glock = callPackage ../development/tools/glock { }; glslviewer = callPackage ../development/tools/glslviewer { From 484473b184ca087f57303be901139d01f142db56 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 2 Aug 2018 00:24:55 +0200 Subject: [PATCH 2/2] openmolcas: init at 20180529 --- .../science/chemistry/openmolcas/default.nix | 72 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 74 insertions(+) create mode 100644 pkgs/applications/science/chemistry/openmolcas/default.nix diff --git a/pkgs/applications/science/chemistry/openmolcas/default.nix b/pkgs/applications/science/chemistry/openmolcas/default.nix new file mode 100644 index 000000000000..5e1628a4fba7 --- /dev/null +++ b/pkgs/applications/science/chemistry/openmolcas/default.nix @@ -0,0 +1,72 @@ +{ stdenv, pkgs, fetchFromGitLab, cmake, gfortran, perl +, openblas, hdf5-cpp, python3, texlive +, armadillo, openmpi, globalarrays, openssh +, makeWrapper +} : + +let + version = "20180529"; + gitLabRev = "b6b9ceffccae0dd7f14c099468334fee0b1071fc"; + + python = python3.withPackages (ps : with ps; [ six pyparsing ]); + +in stdenv.mkDerivation { + name = "openmolcas-${version}"; + + src = fetchFromGitLab { + owner = "Molcas"; + repo = "OpenMolcas"; + rev = gitLabRev; + sha256 = "1wbjjdv07lg1x4kdnf28anyrjgy33gdgrd5d7zi1c97nz7vhdjaz"; + }; + + nativeBuildInputs = [ perl cmake texlive.combined.scheme-minimal makeWrapper ]; + buildInputs = [ + gfortran + openblas + hdf5-cpp + python + armadillo + openmpi + globalarrays + openssh + ]; + + enableParallelBuilding = true; + + cmakeFlags = [ + "-DOPENMP=ON" + "-DGA=ON" + "-DMPI=ON" + "-DLINALG=OpenBLAS" + "-DTOOLS=ON" + "-DHDF5=ON" + "-DFDE=ON" + "-DOPENBLASROOT=${openblas}" + ]; + + GAROOT=globalarrays; + + postConfigure = '' + # The Makefile will install pymolcas during the build grrr. + mkdir -p $out/bin + export PATH=$PATH:$out/bin + ''; + + postFixup = '' + # Wrong store path in shebang (no Python pkgs), force re-patching + sed -i "1s:/.*:/usr/bin/env python:" $out/bin/pymolcas + patchShebangs $out/bin + + wrapProgram $out/bin/pymolcas --set MOLCAS $out + ''; + + meta = with stdenv.lib; { + description = "Advanced quantum chemistry software package"; + homepage = https://gitlab.com/Molcas/OpenMolcas; + maintainers = [ maintainers.markuskowa ]; + license = licenses.lgpl21; + platforms = platforms.linux; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5b179ef8490e..e09406cdefe9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20278,6 +20278,8 @@ with pkgs; octopus = callPackage ../applications/science/chemistry/octopus { openblas=openblasCompat; }; + openmolcas = callPackage ../applications/science/chemistry/openmolcas { }; + pymol = callPackage ../applications/science/chemistry/pymol { }; ### SCIENCE/GEOMETRY