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.

42 lines
979 B
Nix

#{ lib, stdenv, fetchurl, gfortran, mpi, jasper, netcdf, netcdf-fortran, zlib, removeReferencesTo}:
with import <nixpkgs> {};
let netcdf-full = pkgs.buildEnv {
name = "netcdf+c+fortran";
paths = [
netcdf
netcdffortran
];
};
in
stdenv.mkDerivation {
pname = "WPS";
version = "4.4";
src = fetchurl {
url = "https://github.com/wrf-model/WPS/archive/refs/tags/v4.4.tar.gz";
sha256 = "sha256-/pyNippKu/gAsw5suzeGBMYEDkU29VlLji2uQ+lC4rM=";
};
nativeBuildInputs = [ m4 removeReferencesTo ];
buildInputs = [ mpi netcdf-full gfortran zlib jasper openmpi libpng gomp ];
dontAddPrefix=true;
env.NETCDF=netcdf-full;
env.JASPERLIB=jasper + "/lib";
env.JASPERINC=jasper + "/include";
env.WRF_DIR = "../WRF";
env.NIX_LDFLAGS = "-lnetcdff";
configurePhase= ''
bash -c "echo 35 | ./configure"
'';
buildPhase= ''
bash -c "./compile wrf"
'';
installPhase= ''
'';
}