You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.0 KiB
Nix
52 lines
1.0 KiB
Nix
#{ lib, stdenv, fetchurl, gfortran, mpi, jasper, netcdf, netcdffortran, zlib, removeReferencesTo}:
|
|
|
|
with import <nixpkgs> {};
|
|
|
|
let netcdf-full = pkgs.buildEnv {
|
|
name = "netcdf+c+fortran";
|
|
paths = [
|
|
netcdf
|
|
netcdffortran
|
|
];
|
|
};
|
|
in
|
|
|
|
gcc9Stdenv.mkDerivation {
|
|
pname = "WRF";
|
|
version = "4.4.2";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/wrf-model/WRF/releases/download/v4.4.2/v4.4.2.tar.gz";
|
|
sha256 = "sha256-SIuZLo6ZRjfFjjxp6GmtBaz+eUGcAfvvat4fYk5Q3Do=";
|
|
};
|
|
|
|
nativeBuildInputs = [ m4 removeReferencesTo ];
|
|
buildInputs = [ mpi
|
|
netcdf-full
|
|
gfortran
|
|
zlib
|
|
jasper
|
|
openmpi
|
|
libpng
|
|
gomp
|
|
hdf5-mpi
|
|
hdf5-fortran];
|
|
dontAddPrefix=true;
|
|
env.HDF5=hdf5-mpi;
|
|
env.NETCDF=netcdf-full;
|
|
env.JASPERLIB=jasper + "/lib";
|
|
env.JASPERINC=jasper + "/include";
|
|
NIX_CFLAGS_COMPILE = "-Wno-format-security";
|
|
env.NIX_LDFLAGS = "-lnetcdff";
|
|
configurePhase= ''
|
|
bash -c "echo 34 | ./configure"
|
|
'';
|
|
|
|
buildPhase= ''
|
|
bash -c "./compile wrf"
|
|
'';
|
|
|
|
installPhase= ''
|
|
'';
|
|
}
|