nixpkgs/pkgs/development/libraries/plplot/default.nix

48 lines
1013 B
Nix
Raw Normal View History

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