3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/plplot/default.nix
Shamrock Lee d80b0c0171 gnudatalanguage: Init at 1.0.0
*   Generate PlPlot drivers by
    injecting wxGtk31 (if enableWX == true)
    and/or xorg.libX11 (if enableXWin == true,
    default to false)
    into the buildInputs of plplot
    with plplot.overrideAttrs
*   Override hdf4 and hdf5 with
    custom mpi (if
    enableMPI == true and libraryMPI == mpich)
    and szip (if enableSzip == true, default to false)
2021-10-17 14:06:31 +08:00

48 lines
1 KiB
Nix

{ lib
, stdenv
, fetchurl
, cmake
, enableWX ? false
, wxGTK31, wxmac
, enableXWin ? false
, libX11
}:
let
wxWidgets = (if stdenv.isDarwin then wxmac else wxGTK31);
in stdenv.mkDerivation rec {
pname = "plplot";
version = "5.15.0";
src = fetchurl {
url = "https://downloads.sourceforge.net/project/${pname}/${pname}/${version}%20Source/${pname}-${version}.tar.gz";
sha256 = "0ywccb6bs1389zjfmc9zwdvdsvlpm7vg957whh6b5a96yvcf8bdr";
};
nativeBuildInputs = [ cmake ];
buildInputs = lib.optional enableWX wxWidgets
++ lib.optional enableXWin libX11;
passthru = {
inherit
enableWX
wxWidgets
enableXWin
libX11
;
};
cmakeFlags = [ "-DCMAKE_SKIP_BUILD_RPATH=OFF" "-DBUILD_TEST=ON" ];
doCheck = true;
meta = with lib; {
description = "Cross-platform scientific graphics plotting library";
homepage = "https://plplot.org";
maintainers = with maintainers; [ bcdarwin ];
platforms = platforms.unix;
license = licenses.lgpl2;
};
}