Files
ccpkgs/pkgs/octopus/octopus.nix

66 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, fetchFromGitLab, autoreconfHook, gfortran, perl
, openmpi, libxc3, blas, liblapack, gsl, fftw, netcdffortran, arpack, libyaml }:
let
common = version: sha256: stdenv.mkDerivation rec {
inherit version;
name = "octopus-${version}";
src = fetchFromGitLab {
owner = "octopus-code";
repo = "octopus";
rev = version;
inherit sha256;
};
buildInputs = [
autoreconfHook
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;/' m4/netcdf.m4
'';
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" "04r826vj7sps3pnwkn8axh4jkiqwddy96lbr3ly4x6ph9c9xmvrq";
}