mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
gnudatalanguage: fix build on aarch64-darwin
This commit is contained in:
parent
d87090ce15
commit
25491b5dc3
@ -18,13 +18,16 @@
|
|||||||
, udunits
|
, udunits
|
||||||
, eigen
|
, eigen
|
||||||
, pslib
|
, pslib
|
||||||
, eccodes
|
|
||||||
, glpk
|
|
||||||
, libpng
|
, libpng
|
||||||
, plplot
|
, plplot
|
||||||
, libtiff
|
, libtiff
|
||||||
, libgeotiff
|
, libgeotiff
|
||||||
, libjpeg
|
, libjpeg
|
||||||
|
# eccodes is broken on darwin
|
||||||
|
, enableGRIB ? stdenv.isLinux
|
||||||
|
, eccodes
|
||||||
|
, enableGLPK ? stdenv.isLinux
|
||||||
|
, glpk
|
||||||
# We enable it in hdf4 and use libtirpc as a dependency here from the passthru
|
# We enable it in hdf4 and use libtirpc as a dependency here from the passthru
|
||||||
# of hdf4
|
# of hdf4
|
||||||
, enableLibtirpc ? stdenv.isLinux
|
, enableLibtirpc ? stdenv.isLinux
|
||||||
@ -53,9 +56,10 @@
|
|||||||
, netcdf-forced ? null
|
, netcdf-forced ? null
|
||||||
, plplot-forced ? null
|
, plplot-forced ? null
|
||||||
# wxWidgets is preferred over X11 for this project but we only have it on Linux
|
# wxWidgets is preferred over X11 for this project but we only have it on Linux
|
||||||
# and Darwin. Also, we use the wxWidgets dependency here from the passthru of
|
# and Darwin.
|
||||||
# plplot.
|
|
||||||
, enableWX ? (stdenv.isLinux || stdenv.isDarwin)
|
, enableWX ? (stdenv.isLinux || stdenv.isDarwin)
|
||||||
|
, wxGTK32
|
||||||
|
, Cocoa
|
||||||
# X11: OFF by default for platform consistency. Use X where WX is not available
|
# X11: OFF by default for platform consistency. Use X where WX is not available
|
||||||
, enableXWin ? (!stdenv.isLinux && !stdenv.isDarwin)
|
, enableXWin ? (!stdenv.isLinux && !stdenv.isDarwin)
|
||||||
}:
|
}:
|
||||||
@ -128,8 +132,6 @@ stdenv.mkDerivation rec {
|
|||||||
udunits
|
udunits
|
||||||
eigen
|
eigen
|
||||||
pslib
|
pslib
|
||||||
eccodes
|
|
||||||
glpk
|
|
||||||
libpng
|
libpng
|
||||||
libtiff
|
libtiff
|
||||||
libgeotiff
|
libgeotiff
|
||||||
@ -139,7 +141,10 @@ stdenv.mkDerivation rec {
|
|||||||
netcdf-custom
|
netcdf-custom
|
||||||
plplot-with-drivers
|
plplot-with-drivers
|
||||||
] ++ lib.optional enableXWin plplot-with-drivers.libX11
|
] ++ lib.optional enableXWin plplot-with-drivers.libX11
|
||||||
++ lib.optional enableWX plplot-with-drivers.wxWidgets
|
++ lib.optional enableGRIB eccodes
|
||||||
|
++ lib.optional enableGLPK glpk
|
||||||
|
++ lib.optional enableWX wxGTK32
|
||||||
|
++ lib.optional (enableWX && stdenv.isDarwin) Cocoa
|
||||||
++ lib.optional enableMPI mpi
|
++ lib.optional enableMPI mpi
|
||||||
++ lib.optional enableLibtirpc hdf4-custom.libtirpc
|
++ lib.optional enableLibtirpc hdf4-custom.libtirpc
|
||||||
++ lib.optional enableSzip szip;
|
++ lib.optional enableSzip szip;
|
||||||
@ -156,19 +161,29 @@ stdenv.mkDerivation rec {
|
|||||||
++ [ (if enableHDF5 then "-DHDF5DIR=${hdf5-custom}" else "-DHDF5=OFF") ]
|
++ [ (if enableHDF5 then "-DHDF5DIR=${hdf5-custom}" else "-DHDF5=OFF") ]
|
||||||
++ lib.optional (!enableNetCDF) "-DNETCDF=OFF"
|
++ lib.optional (!enableNetCDF) "-DNETCDF=OFF"
|
||||||
++ lib.optional (!enablePlplotDrivers) "-DINTERACTIVE_GRAPHICS=OFF"
|
++ lib.optional (!enablePlplotDrivers) "-DINTERACTIVE_GRAPHICS=OFF"
|
||||||
|
++ lib.optional (!enableGRIB) "-DGRIB=OFF"
|
||||||
|
++ lib.optional (!enableGLPK) "-DGLPK=OFF"
|
||||||
++ lib.optional (!enableWX) "-DWXWIDGETS=OFF"
|
++ lib.optional (!enableWX) "-DWXWIDGETS=OFF"
|
||||||
++ lib.optional enableSzip "-DSZIPDIR=${szip}"
|
++ lib.optional enableSzip "-DSZIPDIR=${szip}"
|
||||||
++ lib.optionals enableXWin [ "-DX11=ON" "-DX11DIR=${plplot-with-drivers.libX11}" ]
|
++ lib.optionals enableXWin [ "-DX11=ON" "-DX11DIR=${plplot-with-drivers.libX11}" ]
|
||||||
++ lib.optionals enableMPI [ "-DMPI=ON" "-DMPIDIR=${mpi}" ];
|
++ lib.optionals enableMPI [ "-DMPI=ON" "-DMPIDIR=${mpi}" ];
|
||||||
|
|
||||||
doCheck = true;
|
# Tests are failing on Hydra:
|
||||||
|
# ./src/common/dpycmn.cpp(137): assert ""IsOk()"" failed in GetClientArea(): invalid wxDisplay object
|
||||||
|
doCheck = stdenv.isLinux;
|
||||||
|
|
||||||
# Opt-out unstable tests
|
# Opt-out unstable tests
|
||||||
# https://github.com/gnudatalanguage/gdl/issues/482
|
# https://github.com/gnudatalanguage/gdl/issues/482
|
||||||
# https://github.com/gnudatalanguage/gdl/issues/1079
|
# https://github.com/gnudatalanguage/gdl/issues/1079
|
||||||
# https://github.com/gnudatalanguage/gdl/issues/460
|
# https://github.com/gnudatalanguage/gdl/issues/460
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
checkFlagsArray+=("ARGS=-E 'test_tic_toc.pro|test_byte_conversion.pro|test_bytscl.pro|test_call_external.pro'")
|
checkFlagsArray+=("ARGS=-E '${lib.concatMapStringsSep "|" (test: test + ".pro") [
|
||||||
|
"test_byte_conversion"
|
||||||
|
"test_bytscl"
|
||||||
|
"test_call_external"
|
||||||
|
"test_tic_toc"
|
||||||
|
"test_timestamp"
|
||||||
|
]}'")
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
|
@ -3,14 +3,13 @@
|
|||||||
, fetchurl
|
, fetchurl
|
||||||
, cmake
|
, cmake
|
||||||
, enableWX ? false
|
, enableWX ? false
|
||||||
, wxGTK31, wxmac
|
, wxGTK32
|
||||||
|
, Cocoa
|
||||||
, enableXWin ? false
|
, enableXWin ? false
|
||||||
, libX11
|
, libX11
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
stdenv.mkDerivation rec {
|
||||||
wxWidgets = (if stdenv.isDarwin then wxmac else wxGTK31);
|
|
||||||
in stdenv.mkDerivation rec {
|
|
||||||
pname = "plplot";
|
pname = "plplot";
|
||||||
version = "5.15.0";
|
version = "5.15.0";
|
||||||
|
|
||||||
@ -21,13 +20,13 @@ in stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
|
|
||||||
buildInputs = lib.optional enableWX wxWidgets
|
buildInputs = lib.optional enableWX wxGTK32
|
||||||
|
++ lib.optional (enableWX && stdenv.isDarwin) Cocoa
|
||||||
++ lib.optional enableXWin libX11;
|
++ lib.optional enableXWin libX11;
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
inherit
|
inherit
|
||||||
enableWX
|
enableWX
|
||||||
wxWidgets
|
|
||||||
enableXWin
|
enableXWin
|
||||||
libX11
|
libX11
|
||||||
;
|
;
|
||||||
|
@ -7485,6 +7485,7 @@ with pkgs;
|
|||||||
|
|
||||||
plplot = callPackage ../development/libraries/plplot {
|
plplot = callPackage ../development/libraries/plplot {
|
||||||
inherit (xorg) libX11;
|
inherit (xorg) libX11;
|
||||||
|
inherit (darwin.apple_sdk.frameworks) Cocoa;
|
||||||
};
|
};
|
||||||
|
|
||||||
pxattr = callPackage ../tools/archivers/pxattr { };
|
pxattr = callPackage ../tools/archivers/pxattr { };
|
||||||
@ -15288,6 +15289,7 @@ with pkgs;
|
|||||||
|
|
||||||
gnudatalanguage = callPackage ../development/interpreters/gnudatalanguage {
|
gnudatalanguage = callPackage ../development/interpreters/gnudatalanguage {
|
||||||
inherit (llvmPackages) openmp;
|
inherit (llvmPackages) openmp;
|
||||||
|
inherit (darwin.apple_sdk.frameworks) Cocoa;
|
||||||
# MPICH currently build on Darwin
|
# MPICH currently build on Darwin
|
||||||
mpi = mpich;
|
mpi = mpich;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user