about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/plplot
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/plplot')
-rw-r--r--nixpkgs/pkgs/development/libraries/plplot/default.nix48
1 files changed, 48 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/plplot/default.nix b/nixpkgs/pkgs/development/libraries/plplot/default.nix
new file mode 100644
index 000000000000..66c498418d98
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/plplot/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, stdenv
+, fetchurl
+, cmake
+, enableWX ? false
+, wxGTK32
+, Cocoa
+, enableXWin ? false
+, xorg
+}:
+
+stdenv.mkDerivation rec {
+  pname   = "plplot";
+  version = "5.15.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/${pname}/${pname}/${version}%20Source/${pname}-${version}.tar.gz";
+    sha256 = "0ywccb6bs1389zjfmc9zwdvdsvlpm7vg957whh6b5a96yvcf8bdr";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = lib.optional enableWX wxGTK32
+    ++ lib.optional (enableWX && stdenv.isDarwin) Cocoa
+    ++ lib.optional enableXWin xorg.libX11;
+
+  passthru = {
+    inherit (xorg) libX11;
+    inherit
+      enableWX
+      enableXWin
+    ;
+  };
+
+  cmakeFlags = [
+    "-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;
+  };
+}