64 lines
1.7 KiB
Nix
64 lines
1.7 KiB
Nix
# The following optional dependencies are not currently available
|
|
#
|
|
# pfft, pnfft, etdf_io, berkeleygw, sparskit, blacs elpa, parpack,
|
|
# feast, libfm (think this is actually scafacos) poke, parmetis
|
|
# (requires metis)
|
|
#
|
|
# The following optional dependencies are not suitable for given reason
|
|
#
|
|
# nlopt (only provides libnlopt_cxx which requires c++ compiler for linking)
|
|
#
|
|
|
|
{ stdenv, fetchurl, gfortran, perl, openmpi
|
|
, libxc3, blas, liblapack, gsl, fftw, netcdffortran
|
|
, arpack, libyaml }:
|
|
|
|
let
|
|
common = version: sha256: stdenv.mkDerivation rec {
|
|
inherit version;
|
|
name = "octopus-${version}";
|
|
|
|
src = fetchurl {
|
|
url = "http://www.tddft.org/programs/octopus/down.php?file=${version}/octopus-${version}.tar.gz";
|
|
inherit sha256;
|
|
};
|
|
|
|
buildInputs = [
|
|
gfortran
|
|
perl
|
|
openmpi
|
|
libxc3
|
|
blas
|
|
liblapack
|
|
gsl
|
|
fftw
|
|
netcdffortran
|
|
arpack
|
|
libyaml
|
|
];
|
|
|
|
# Extend netcdf library combo test to include just -lnetcdff
|
|
postPatch = ''
|
|
patchShebangs build
|
|
sed -i -e 's/in "" -lnetcdf "-lnetcdff -lnetcdf";/in "" -lnetcdf "-lnetcdff -lnetcdf" -lnetcdff;/' configure
|
|
'';
|
|
|
|
configureFlags = [
|
|
"--enable-mpi"
|
|
"--with-libxc-prefix=${libxc3}"
|
|
"--with-fftw-prefix=${fftw.dev}"
|
|
"--with-netcdf-prefix=${netcdffortran}"
|
|
];
|
|
|
|
meta = with stdenv.lib; {
|
|
homepage = http://octopus-code.org/wiki/Main_Page;
|
|
description = "Octopus is a scientific program aimed at the ab initio virtual experimentation.";
|
|
platforms = platforms.all;
|
|
license = licenses.gpl2;
|
|
};
|
|
};
|
|
|
|
in {
|
|
octopus72 = common "7.2" "03zzmq72zdnjkhifbmlxs7ig7x6sf6mv8zv9mxhakm9hzwa9yn7m";
|
|
}
|