octopus: Initial packaging
This commit is contained in:
@@ -8,8 +8,12 @@ self: super: pkgs: with pkgs; {
|
||||
|
||||
#firedrake = callPackage ./firedrake { };
|
||||
|
||||
libxc3 = callPackage ./octopus/libxc3.nix { };
|
||||
|
||||
#meraculous = callPackage ./meraculous.nix { };
|
||||
|
||||
octopus = callPackage ./octopus { };
|
||||
|
||||
#openfoam = callPackage ./openfoam.nix { };
|
||||
|
||||
openslide = callPackage ./openslide { };
|
||||
|
||||
59
pkgs/octopus/default.nix
Normal file
59
pkgs/octopus/default.nix
Normal file
@@ -0,0 +1,59 @@
|
||||
# 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, overrideCC, gcc5, gfortran5, perl, openmpi
|
||||
, libxc3, blas, liblapack, gsl, fftw, netcdffortran
|
||||
, arpack, libyaml }:
|
||||
|
||||
|
||||
(overrideCC stdenv gcc5).mkDerivation rec {
|
||||
version = "7.2";
|
||||
name = "octopus-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.tddft.org/programs/octopus/down.php?file=${version}/octopus-${version}.tar.gz";
|
||||
sha256 = "03zzmq72zdnjkhifbmlxs7ig7x6sf6mv8zv9mxhakm9hzwa9yn7m";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
gfortran5
|
||||
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;
|
||||
};
|
||||
}
|
||||
24
pkgs/octopus/libxc3.nix
Normal file
24
pkgs/octopus/libxc3.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ stdenv, fetchurl, gfortran, perl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "3.0.1";
|
||||
name = "libxc-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.tddft.org/programs/octopus/down.php?file=libxc/${version}/libxc-${version}.tar.gz";
|
||||
sha256 = "1xyac89yx03vm86rvk07ps1d39xss3amw46a1k53mv30mgr94rl3";
|
||||
};
|
||||
|
||||
buildInputs = [ gfortran perl ];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs src testsuite
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://octopus-code.org/wiki/Libxc;
|
||||
description = "Libxc is a library of exchange-correlation functionals for density-functional theory.";
|
||||
platforms = platforms.all;
|
||||
license = licenses.gpl3;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user