diff --git a/pkgs/development/libraries/plplot/default.nix b/pkgs/development/libraries/plplot/default.nix index 05f12d0148be..a4a554eea6ee 100644 --- a/pkgs/development/libraries/plplot/default.nix +++ b/pkgs/development/libraries/plplot/default.nix @@ -1,6 +1,16 @@ -{ lib, stdenv, fetchurl, cmake }: +{ lib +, stdenv +, fetchurl +, cmake +, enableWX ? false +, wxGTK31, wxmac +, enableXWin ? false +, libX11 +}: -stdenv.mkDerivation rec { +let + wxWidgets = (if stdenv.isDarwin then wxmac else wxGTK31); +in stdenv.mkDerivation rec { pname = "plplot"; version = "5.15.0"; @@ -11,6 +21,21 @@ stdenv.mkDerivation rec { 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; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9933bfc4af47..9728ae4ce92d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5900,7 +5900,9 @@ with pkgs; pixz = callPackage ../tools/compression/pixz { }; - plplot = callPackage ../development/libraries/plplot { }; + plplot = callPackage ../development/libraries/plplot { + inherit (xorg) libX11; + }; pxattr = callPackage ../tools/archivers/pxattr { };