gnuplot: migrate to by-name, switch to finalAttrs (#481675)

This commit is contained in:
Weijia Wang
2026-04-13 21:07:22 +00:00
committed by GitHub
5 changed files with 23 additions and 19 deletions
@@ -28,22 +28,19 @@
gnused,
coreutils,
withQt ? false,
qttools,
wrapQtAppsHook,
qtbase,
qtsvg,
qt5,
}:
let
withX = !aquaterm && !stdenv.hostPlatform.isDarwin;
in
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "gnuplot";
version = "6.0.4";
src = fetchurl {
url = "mirror://sourceforge/gnuplot/gnuplot-${version}.tar.gz";
sha256 = "sha256-RY2UdpYl5z1fYjJQD0nLrcsrGDOA1D0iZqD5cBrrnFs=";
url = "mirror://sourceforge/gnuplot/gnuplot-${finalAttrs.version}.tar.gz";
hash = "sha256-RY2UdpYl5z1fYjJQD0nLrcsrGDOA1D0iZqD5cBrrnFs=";
};
nativeBuildInputs = [
@@ -52,8 +49,8 @@ stdenv.mkDerivation rec {
texinfo
]
++ lib.optionals withQt [
qttools
wrapQtAppsHook
qt5.qttools
qt5.wrapQtAppsHook
];
buildInputs = [
@@ -74,8 +71,8 @@ stdenv.mkDerivation rec {
libxaw
]
++ lib.optionals withQt [
qtbase
qtsvg
qt5.qtbase
qt5.qtsvg
]
++ lib.optional withWxGTK wxwidgets_3_2;
@@ -131,4 +128,4 @@ stdenv.mkDerivation rec {
maintainers = [ ];
mainProgram = "gnuplot";
};
}
})
@@ -0,0 +1,7 @@
{
gnuplot,
}:
gnuplot.override {
aquaterm = true;
}
+7
View File
@@ -0,0 +1,7 @@
{
gnuplot,
}:
gnuplot.override {
withQt = true;
}
-7
View File
@@ -2401,13 +2401,6 @@ with pkgs;
};
gnupg = gnupg24;
gnuplot = libsForQt5.callPackage ../tools/graphics/gnuplot { };
gnuplot_qt = gnuplot.override { withQt = true; };
# must have AquaTerm installed separately
gnuplot_aquaterm = gnuplot.override { aquaterm = true; };
gnused = callPackage ../tools/text/gnused { };
gnutar = callPackage ../tools/archivers/gnutar { };