22 assert lib.asserts.assertMsg (!blas.isILP64) "A 32 bit integer implementation of BLAS is required.";
24 assert lib.asserts.assertMsg (
26 ) "A 32 bit integer implementation of LAPACK is required.";
29 gpawConfig = writeTextFile {
30 name = "siteconfig.py";
34 mpicompiler = '${lib.getDev mpi}/bin/mpicc'
35 mpilinker = '${lib.getDev mpi}/bin/mpicc'
39 library_dirs += ['${blas}/lib']
44 libraries += ['fftw3']
48 libraries += ['scalapack']
54 include_dirs += [xc + 'include']
55 library_dirs += [xc + 'lib/']
56 extra_link_args += ['-Wl,-rpath={xc}/lib'.format(xc=xc)]
57 if 'xc' not in libraries:
58 libraries.append('xc')
63 vdwxc = '${libvdwxc}/'
64 extra_link_args += ['-Wl,-rpath=%s/lib' % vdwxc]
65 library_dirs += ['%s/lib' % vdwxc]
66 include_dirs += ['%s/include' % vdwxc]
67 libraries += ['vdwxc']
71 setupVersion = "0.9.20000";
72 pawDataSets = fetchurl {
73 url = "https://wiki.fysik.dtu.dk/gpaw-files/gpaw-setups-${setupVersion}.tar.gz";
74 sha256 = "07yldxnn38gky39fxyv3rfzag9p4lb0xfpzn15wy2h9aw4mnhwbc";
77 buildPythonPackage rec {
80 format = "setuptools";
82 src = fetchFromGitLab {
86 hash = "sha256-8eX50F124R46dGN2rJS/dDvPeDmEm7XpVyTiOAjMKyI=";
89 # `inetutils` is required because importing `gpaw`, as part of
90 # pythonImportsCheck, tries to execute its binary, which in turn tries to
91 # execute `rsh` as a side-effect.
105 propagatedBuildInputs = [
113 patches = [ ./SetupPath.patch ];
116 substituteInPlace gpaw/__init__.py \
117 --subst-var-by gpawSetupPath "$out/share/gpaw/gpaw-setups-${setupVersion}"
122 cp ${gpawConfig} siteconfig.py
127 mkdir -p $out/share/gpaw && cd $out/share/gpaw
128 cp ${pawDataSets} gpaw-setups.tar.gz
129 tar -xvf $out/share/gpaw/gpaw-setups.tar.gz
130 rm gpaw-setups.tar.gz
134 doCheck = false; # Requires MPI runtime to work in the sandbox
135 pythonImportsCheck = [ "gpaw" ];
142 description = "Density functional theory and beyond within the projector-augmented wave method";
143 homepage = "https://wiki.fysik.dtu.dk/gpaw/index.html";
144 license = licenses.gpl3Only;
145 platforms = platforms.unix;
146 maintainers = [ maintainers.sheepforce ];