plplot: compile optional png support (#343908)

This commit is contained in:
Aleksana
2024-09-24 11:21:32 +08:00
committed by GitHub
+30 -17
View File
@@ -1,16 +1,21 @@
{ lib
, stdenv
, fetchurl
, cmake
, enableWX ? false
, wxGTK32
, Cocoa
, enableXWin ? false
, xorg
{
lib,
stdenv,
fetchurl,
cmake,
pkg-config,
enableWX ? false,
wxGTK32,
Cocoa,
enableXWin ? false,
xorg,
enablePNG ? false,
cairo,
pango,
}:
stdenv.mkDerivation rec {
pname = "plplot";
pname = "plplot";
version = "5.15.0";
src = fetchurl {
@@ -18,18 +23,26 @@ stdenv.mkDerivation rec {
sha256 = "0ywccb6bs1389zjfmc9zwdvdsvlpm7vg957whh6b5a96yvcf8bdr";
};
nativeBuildInputs = [ cmake ];
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = lib.optional enableWX wxGTK32
buildInputs =
lib.optional enableWX wxGTK32
++ lib.optional (enableWX && stdenv.isDarwin) Cocoa
++ lib.optional enableXWin xorg.libX11;
++ lib.optional enableXWin xorg.libX11
++ lib.optionals enablePNG [
cairo
pango
];
passthru = {
inherit (xorg) libX11;
inherit
enableWX
enableXWin
;
;
};
cmakeFlags = [
@@ -41,9 +54,9 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "Cross-platform scientific graphics plotting library";
mainProgram = "pltek";
homepage = "https://plplot.org";
homepage = "https://plplot.org";
maintainers = with maintainers; [ bcdarwin ];
platforms = platforms.unix;
license = licenses.lgpl2;
platforms = platforms.unix;
license = licenses.lgpl2;
};
}