diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/graphics/gnuplot/default.nix')
-rw-r--r-- | nixpkgs/pkgs/tools/graphics/gnuplot/default.nix | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/tools/graphics/gnuplot/default.nix b/nixpkgs/pkgs/tools/graphics/gnuplot/default.nix index e29e259b1346..90f8b2cade6b 100644 --- a/nixpkgs/pkgs/tools/graphics/gnuplot/default.nix +++ b/nixpkgs/pkgs/tools/graphics/gnuplot/default.nix @@ -8,7 +8,7 @@ , libXpm ? null , libXaw ? null , aquaterm ? false -, withWxGTK ? false, wxGTK ? null +, withWxGTK ? false, wxGTK32, Cocoa , fontconfig ? null , gnused ? null , coreutils ? null @@ -21,11 +21,11 @@ let in (if withQt then mkDerivation else stdenv.mkDerivation) rec { pname = "gnuplot"; - version = "5.4.3"; + version = "5.4.6"; src = fetchurl { url = "mirror://sourceforge/gnuplot/${pname}-${version}.tar.gz"; - sha256 = "sha256-UfiburkPltNUP5UjU2jRiOseJu2ilpEiVqvNNTW9TYQ="; + sha256 = "sha256-AvwnkYIA7WTY8MO4T+gblbWc1HrZnycJOa5JfBnydBk="; }; nativeBuildInputs = [ makeWrapper pkg-config texinfo ] ++ lib.optional withQt qttools; @@ -37,7 +37,8 @@ in ++ lib.optional withCaca libcaca ++ lib.optionals withX [ libX11 libXpm libXt libXaw ] ++ lib.optionals withQt [ qtbase qtsvg ] - ++ lib.optional withWxGTK wxGTK; + ++ lib.optional withWxGTK wxGTK32 + ++ lib.optional (withWxGTK && stdenv.isDarwin) Cocoa; postPatch = '' # lrelease is in qttools, not in qtbase. @@ -52,14 +53,25 @@ in CXXFLAGS = lib.optionalString (stdenv.isDarwin && withQt) "-std=c++11"; + # we'll wrap things ourselves + dontWrapGApps = true; + dontWrapQtApps = true; + + # binary wrappers don't support --run postInstall = lib.optionalString withX '' - wrapProgram $out/bin/gnuplot \ - --prefix PATH : '${gnused}/bin' \ - --prefix PATH : '${coreutils}/bin' \ - --prefix PATH : '${fontconfig.bin}/bin' \ + wrapProgramShell $out/bin/gnuplot \ + --prefix PATH : '${lib.makeBinPath [ gnused coreutils fontconfig.bin ]}' \ + "''${gappsWrapperArgs[@]}" \ + "''${qtWrapperArgs[@]}" \ --run '. ${./set-gdfontpath-from-fontconfig.sh}' ''; + # When cross-compiling, don't build docs and demos. + # Inspiration taken from https://sourceforge.net/p/gnuplot/gnuplot-main/merge-requests/10/ + makeFlags = lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + "-C src" + ]; + enableParallelBuilding = true; meta = with lib; { |