nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 gfortran,
6 autoreconfHook,
7 perl,
8 mpi,
9 mpiCheckPhaseHook,
10 gitUpdater,
11}:
12
13stdenv.mkDerivation (finalAttrs: {
14 pname = "pnetcdf";
15 version = "1.14.0";
16
17 src = fetchFromGitHub {
18 owner = "Parallel-NetCDF";
19 repo = "PnetCDF";
20 tag = "checkpoint.${finalAttrs.version}";
21 hash = "sha256-Zyhzyvdh9Pf5GkcJW3duGgI6m3Dy0RR5B9YtA83Hpr4=";
22 };
23
24 nativeBuildInputs = [
25 perl
26 autoreconfHook
27 gfortran
28 ];
29
30 buildInputs = [ mpi ];
31
32 postPatch = ''
33 patchShebangs src/binding/f77/buildiface
34 '';
35
36 doCheck = true;
37
38 nativeCheckInputs = [ mpiCheckPhaseHook ];
39
40 checkTarget = lib.concatStringsSep " " [
41 # build all test programs (build only, no run)
42 "tests"
43 # run sequential test programs
44 "check"
45 # run parallel test programs on 3,4,6,8 MPI processes
46 "ptests"
47 ];
48
49 # cannot do parallel check otherwise failed
50 enableParallelChecking = false;
51
52 enableParallelBuilding = true;
53
54 passthru.updateScript = gitUpdater {
55 rev-prefix = "checkpoint.";
56 };
57
58 meta = {
59 homepage = "https://parallel-netcdf.github.io/";
60 license = with lib.licenses; [
61 # Files: *
62 # Copyright: (c) 2003 Northwestern University and Argonne National Laboratory
63 bsd3
64
65 # Files: src/drivers/common/utf8proc.c
66 # Copyright: (c) 2006-2007 Jan Behrens, FlexiGuided GmbH, Berlin
67 mit
68
69 # Files: src/drivers/common/utf8proc_data.c
70 # Copyright: 1991-2007 Unicode, Inc.
71 unicode-30
72 ];
73 description = "Parallel I/O Library for NetCDF File Access";
74 platforms = lib.platforms.unix;
75 maintainers = with lib.maintainers; [ qbisi ];
76 };
77})