diff --git a/nixpkgs-opt.nix b/nixpkgs-opt.nix index bbf89ea2..5d9638ce 100644 --- a/nixpkgs-opt.nix +++ b/nixpkgs-opt.nix @@ -25,6 +25,7 @@ let hpcg = recallPackage hpcg {}; i-pi = recallPackage i-pi {}; gsl = recallPackage gsl {}; + gpaw = python3.pkgs.toPythonApplication (recallPackage python3.pkgs.gpaw {}); libint = recallPackage libint {}; libvori = recallPackage libvori {}; libxc = recallPackage libxc {}; diff --git a/overlay.nix b/overlay.nix index 69fecdae..5519236b 100644 --- a/overlay.nix +++ b/overlay.nix @@ -153,8 +153,6 @@ let gdma = callPackage ./pkgs/apps/gdma { }; - gpaw = super.python3.pkgs.toPythonApplication self.python3.pkgs.gpaw; - harminv = callPackage ./pkgs/apps/harminv { }; iboview = prev.libsForQt5.callPackage ./pkgs/apps/iboview { }; diff --git a/pkgs/apps/gpaw/SetupPath.patch b/pkgs/apps/gpaw/SetupPath.patch deleted file mode 100644 index e1338942..00000000 --- a/pkgs/apps/gpaw/SetupPath.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/gpaw/__init__.py b/gpaw/__init__.py -index b5c029e13..518c16b13 100644 ---- a/gpaw/__init__.py -+++ b/gpaw/__init__.py -@@ -201,12 +201,7 @@ def initialize_data_paths(): - try: - setup_paths[:0] = os.environ['GPAW_SETUP_PATH'].split(os.pathsep) - except KeyError: -- if len(setup_paths) == 0: -- if os.pathsep == ';': -- setup_paths[:] = [r'C:\gpaw-setups'] -- else: -- setup_paths[:] = ['/usr/local/share/gpaw-setups', -- '/usr/share/gpaw-setups'] -+ setup_paths[:0] = ["@gpawSetupPath@"] - - - read_rc_file() diff --git a/pkgs/apps/gpaw/default.nix b/pkgs/apps/gpaw/default.nix deleted file mode 100644 index 7e4845d3..00000000 --- a/pkgs/apps/gpaw/default.nix +++ /dev/null @@ -1,124 +0,0 @@ -{ fetchFromGitLab, buildPythonPackage, lib, writeTextFile -, fetchurl, blas, lapack, scalapack, mpi, fftw-mpi, libxc, libvdwxc -, which, ase, numpy, scipy -} : - -assert - lib.asserts.assertMsg - (!blas.isILP64) - "A 32 bit integer implementation of BLAS is required."; - -assert - lib.asserts.assertMsg - (!lapack.isILP64) - "A 32 bit integer implementation of LAPACK is required."; - -let - gpawConfig = writeTextFile { - name = "siteconfig.py"; - text = '' - # Compiler - compiler = 'gcc' - mpicompiler = '${mpi}/bin/mpicc' - mpilinker = '${mpi}/bin/mpicc' - - # BLAS - libraries += ['blas'] - library_dirs += ['${blas}/lib'] - - # FFTW - fftw = True - if fftw: - libraries += ['fftw3'] - - scalapack = True - if scalapack: - libraries += ['scalapack'] - - # LibXC - libxc = True - if libxc: - xc = '${libxc}/' - include_dirs += [xc + 'include'] - library_dirs += [xc + 'lib/'] - extra_link_args += ['-Wl,-rpath={xc}/lib'.format(xc=xc)] - if 'xc' not in libraries: - libraries.append('xc') - - # LibVDWXC - libvdwxc = True - if libvdwxc: - vdwxc = '${libvdwxc}/' - extra_link_args += ['-Wl,-rpath=%s/lib' % vdwxc] - library_dirs += ['%s/lib' % vdwxc] - include_dirs += ['%s/include' % vdwxc] - libraries += ['vdwxc'] - ''; - }; - - setupVersion = "0.9.20000"; - pawDataSets = fetchurl { - url = "https://wiki.fysik.dtu.dk/gpaw-files/gpaw-setups-${setupVersion}.tar.gz"; - sha256 = "07yldxnn38gky39fxyv3rfzag9p4lb0xfpzn15wy2h9aw4mnhwbc"; - }; - -in buildPythonPackage rec { - pname = "gpaw"; - version = "21.6.0"; - - src = fetchFromGitLab { - owner = "gpaw"; - repo = pname; - rev = version; - sha256 = "0iv7xgrb256m6sq6sd5w4whf635rmvzvlrp9s248qrwb5p98dmg1"; - }; - - nativeBuildInputs = [ which ]; - - buildInputs = [ - blas - scalapack - fftw-mpi - libxc - libvdwxc - ]; - - propagatedBuildInputs = [ - ase - scipy - numpy - mpi - ]; - - patches = [ ./SetupPath.patch ]; - - postPatch = '' - substituteInPlace gpaw/__init__.py \ - --subst-var-by gpawSetupPath "$out/share/gpaw/gpaw-setups-${setupVersion}" - ''; - - postInstall = '' - currDir=$(pwd) - mkdir -p $out/share/gpaw && cd $out/share/gpaw - cp ${pawDataSets} gpaw-setups.tar.gz - tar -xvf $out/share/gpaw/gpaw-setups.tar.gz - rm gpaw-setups.tar.gz - cd $currDir - ''; - - doCheck = false; - - preConfigure = '' - cp ${gpawConfig} siteconfig.py - ''; - - passthru = { inherit mpi; }; - - meta = with lib; { - description = "DFT and beyond within the projector-augmented wave method"; - homepage = "https://wiki.fysik.dtu.dk/gpaw/index.html"; - license = licenses.gpl3Only; - platforms = platforms.unix; - maintainers = [ maintainers.sheepforce ]; - }; -} diff --git a/pythonPackages.nix b/pythonPackages.nix index 490ef9b9..99322412 100644 --- a/pythonPackages.nix +++ b/pythonPackages.nix @@ -20,8 +20,6 @@ let gator = callPackage ./pkgs/apps/gator { }; - gpaw = callPackage ./pkgs/apps/gpaw { }; - gau2grid = callPackage ./pkgs/apps/gau2grid { }; meep = callPackage ./pkgs/apps/meep { };