gnuplot: migrate to by-name, switch to finalAttrs, and remove Qt-specific mkDerivation
This refactor performs a mechanical migration of gnuplot to the by-name
layout and updates the derivation to the modern finalAttrs style.
Key changes:
* Move gnuplot from pkgs/tools/graphics/gnuplot/ to pkgs/by-name/gn/gnuplot/
and rename set-gdfontpath-from-fontconfig.sh accordingly.
* Replace the old `rec { ... }` form with `stdenv.mkDerivation (finalAttrs: { ... })`
following current Nixpkgs conventions.
* Remove the unused mkDerivation argument and stop switching the derivation
function based on `withQt`. gnuplot does not require libsForQt5.mkDerivation;
Qt support is handled entirely through inputs and configure flags.
* Replace qttools/qtbase/qtsvg with libsForQt5.qttools/qtbase/qtsvg when
`withQt = true`.
* Convert `${pname}-${version}` to `${finalAttrs.version}` and update
`sha256` → `hash`.
* Add by-name variants gnuplot_qt and gnuplot_aquaterm using override
wrappers.
* Remove the old top-level aliases for gnuplot, gnuplot_qt, and
gnuplot_aquaterm from all-packages.nix; by-name exposure now handles them.
This change is purely structural and does not modify gnuplot’s build
behaviour beyond adopting the standard finalAttrs pattern.
This commit is contained in:
committed by
Weijia Wang
parent
3a489a04d2
commit
397ffc81e6
@@ -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;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
gnuplot,
|
||||
}:
|
||||
|
||||
gnuplot.override {
|
||||
withQt = true;
|
||||
}
|
||||
@@ -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 { };
|
||||
|
||||
Reference in New Issue
Block a user