From 3a36ccc07549f55bec1f679a4e3b98235005e456 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo?= Date: Tue, 27 Sep 2022 18:46:24 -0300 Subject: [PATCH] xfce: remove archiveUpdater and use httpTwoLevelsUpdater for some packages --- pkgs/desktops/xfce/art/xfce4-icon-theme/default.nix | 12 +++++------- pkgs/desktops/xfce/art/xfwm4-themes/default.nix | 12 +++++------- pkgs/desktops/xfce/default.nix | 7 ------- .../panel-plugins/xfce4-embed-plugin/default.nix | 7 +++++-- .../xfce/panel-plugins/xfce4-eyes-plugin/default.nix | 7 +++++-- .../panel-plugins/xfce4-fsguard-plugin/default.nix | 7 +++++-- .../panel-plugins/xfce4-genmon-plugin/default.nix | 7 +++++-- .../panel-plugins/xfce4-mailwatch-plugin/default.nix | 7 +++++-- .../xfce/panel-plugins/xfce4-mpc-plugin/default.nix | 7 +++++-- .../panel-plugins/xfce4-notes-plugin/default.nix | 7 +++++-- .../panel-plugins/xfce4-sensors-plugin/default.nix | 7 +++++-- .../xfce4-systemload-plugin/default.nix | 7 +++++-- .../panel-plugins/xfce4-timer-plugin/default.nix | 7 +++++-- .../panel-plugins/xfce4-weather-plugin/default.nix | 7 +++++-- 14 files changed, 65 insertions(+), 43 deletions(-) diff --git a/pkgs/desktops/xfce/art/xfce4-icon-theme/default.nix b/pkgs/desktops/xfce/art/xfce4-icon-theme/default.nix index 8c37dde65ccb..23ad1069fb74 100644 --- a/pkgs/desktops/xfce/art/xfce4-icon-theme/default.nix +++ b/pkgs/desktops/xfce/art/xfce4-icon-theme/default.nix @@ -1,15 +1,11 @@ -{ lib, stdenv, fetchurl, pkg-config, intltool, gtk3, gnome-icon-theme, tango-icon-theme, hicolor-icon-theme, xfce }: - -let - category = "art"; -in +{ lib, stdenv, fetchurl, pkg-config, intltool, gtk3, gnome-icon-theme, tango-icon-theme, hicolor-icon-theme, httpTwoLevelsUpdater }: stdenv.mkDerivation rec { pname = "xfce4-icon-theme"; version = "4.4.3"; src = fetchurl { - url = "mirror://xfce/src/${category}/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.bz2"; + url = "mirror://xfce/src/art/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.bz2"; sha256 = "sha256-1HhmktVrilY/ZqXyYPHxOt4R6Gx4y8slqfml/EfPZvo="; }; @@ -28,7 +24,9 @@ stdenv.mkDerivation rec { dontDropIconThemeCache = true; - passthru.updateScript = xfce.archiveUpdater { inherit category pname version; }; + passthru.updateScript = httpTwoLevelsUpdater { + url = "https://archive.xfce.org/src/art/${pname}"; + }; meta = with lib; { homepage = "https://www.xfce.org/"; diff --git a/pkgs/desktops/xfce/art/xfwm4-themes/default.nix b/pkgs/desktops/xfce/art/xfwm4-themes/default.nix index aae86985b301..6eda846ee311 100644 --- a/pkgs/desktops/xfce/art/xfwm4-themes/default.nix +++ b/pkgs/desktops/xfce/art/xfwm4-themes/default.nix @@ -1,19 +1,17 @@ -{ lib, stdenv, fetchurl, xfce }: - -let - category = "art"; -in +{ lib, stdenv, fetchurl, httpTwoLevelsUpdater }: stdenv.mkDerivation rec { pname = "xfwm4-themes"; version = "4.10.0"; src = fetchurl { - url = "mirror://xfce/src/${category}/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.bz2"; + url = "mirror://xfce/src/art/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.bz2"; sha256 = "sha256-MhTV8A6XA7XoyefDKH1gbe3scoXOtNXbMy6TraZv1XU="; }; - passthru.updateScript = xfce.archiveUpdater { inherit category pname version; }; + passthru.updateScript = httpTwoLevelsUpdater { + url = "https://archive.xfce.org/src/art/${pname}"; + }; meta = with lib; { homepage = "https://www.xfce.org/"; diff --git a/pkgs/desktops/xfce/default.nix b/pkgs/desktops/xfce/default.nix index 294ecc6188c0..811ed736e7a5 100644 --- a/pkgs/desktops/xfce/default.nix +++ b/pkgs/desktops/xfce/default.nix @@ -5,13 +5,6 @@ lib.makeScope pkgs.newScope (self: with self; { genericUpdater = pkgs.genericUpdater; - archiveUpdater = { category, pname, version }: - pkgs.httpTwoLevelsUpdater { - inherit pname version; - attrPath = "xfce.${pname}"; - url = "https://archive.xfce.org/src/${category}/${pname}"; - }; - mkXfceDerivation = callPackage ./mkXfceDerivation.nix { }; automakeAddFlags = pkgs.makeSetupHook { } ./automakeAddFlags.sh; diff --git a/pkgs/desktops/xfce/panel-plugins/xfce4-embed-plugin/default.nix b/pkgs/desktops/xfce/panel-plugins/xfce4-embed-plugin/default.nix index cc4ce861e724..6d8e1199b99b 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-embed-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-embed-plugin/default.nix @@ -7,7 +7,7 @@ , xfce4-panel , libxfce4ui , gtk2 -, xfce +, gitUpdater }: let @@ -33,7 +33,10 @@ in stdenv.mkDerivation rec { gtk2 ]; - passthru.updateScript = xfce.archiveUpdater { inherit category pname version; }; + passthru.updateScript = gitUpdater { + url = "https://gitlab.xfce.org/panel-plugins/${pname}"; + rev-prefix = "${pname}-"; + }; meta = with lib;{ homepage = "https://docs.xfce.org/panel-plugins/xfce4-embed-plugin"; diff --git a/pkgs/desktops/xfce/panel-plugins/xfce4-eyes-plugin/default.nix b/pkgs/desktops/xfce/panel-plugins/xfce4-eyes-plugin/default.nix index e4a252c7ed06..cbf526e3d98b 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-eyes-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-eyes-plugin/default.nix @@ -8,7 +8,7 @@ , libxfce4ui , xfconf , gtk3 -, xfce +, gitUpdater }: let @@ -35,7 +35,10 @@ in stdenv.mkDerivation rec { gtk3 ]; - passthru.updateScript = xfce.archiveUpdater { inherit category pname version; }; + passthru.updateScript = gitUpdater { + url = "https://gitlab.xfce.org/panel-plugins/${pname}"; + rev-prefix = "${pname}-"; + }; meta = with lib; { homepage = "https://docs.xfce.org/panel-plugins/xfce4-eyes-plugin"; diff --git a/pkgs/desktops/xfce/panel-plugins/xfce4-fsguard-plugin/default.nix b/pkgs/desktops/xfce/panel-plugins/xfce4-fsguard-plugin/default.nix index 81498aea96f4..7f1cfe91891e 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-fsguard-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-fsguard-plugin/default.nix @@ -8,7 +8,7 @@ , libxfce4ui , xfconf , gtk3 -, xfce +, gitUpdater }: let @@ -35,7 +35,10 @@ in stdenv.mkDerivation rec { gtk3 ]; - passthru.updateScript = xfce.archiveUpdater { inherit category pname version; }; + passthru.updateScript = gitUpdater { + url = "https://gitlab.xfce.org/panel-plugins/${pname}"; + rev-prefix = "${pname}-"; + }; meta = with lib; { homepage = "https://docs.xfce.org/panel-plugins/xfce4-fsguard-plugin"; diff --git a/pkgs/desktops/xfce/panel-plugins/xfce4-genmon-plugin/default.nix b/pkgs/desktops/xfce/panel-plugins/xfce4-genmon-plugin/default.nix index 1b794ff2b836..6a43c237037b 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-genmon-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-genmon-plugin/default.nix @@ -7,7 +7,7 @@ , xfce4-panel , libxfce4ui , gtk3 -, xfce +, gitUpdater }: let @@ -33,7 +33,10 @@ in stdenv.mkDerivation rec { gtk3 ]; - passthru.updateScript = xfce.archiveUpdater { inherit category pname version; }; + passthru.updateScript = gitUpdater { + url = "https://gitlab.xfce.org/panel-plugins/${pname}"; + rev-prefix = "${pname}-"; + }; meta = with lib; { homepage = "https://docs.xfce.org/panel-plugins/xfce4-genmon-plugin"; diff --git a/pkgs/desktops/xfce/panel-plugins/xfce4-mailwatch-plugin/default.nix b/pkgs/desktops/xfce/panel-plugins/xfce4-mailwatch-plugin/default.nix index fdd3af5fe402..1b06566170ae 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-mailwatch-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-mailwatch-plugin/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchurl, pkg-config, intltool, xfce4-panel, libxfce4ui, - exo, gnutls, libgcrypt, xfce }: + exo, gnutls, libgcrypt, gitUpdater }: let category = "panel-plugins"; @@ -27,7 +27,10 @@ stdenv.mkDerivation rec { libgcrypt ]; - passthru.updateScript = xfce.archiveUpdater { inherit category pname version; }; + passthru.updateScript = gitUpdater { + url = "https://gitlab.xfce.org/panel-plugins/${pname}"; + rev-prefix = "${pname}-"; + }; meta = with lib; { homepage = "https://docs.xfce.org/panel-plugins/xfce4-mailwatch-plugin"; diff --git a/pkgs/desktops/xfce/panel-plugins/xfce4-mpc-plugin/default.nix b/pkgs/desktops/xfce/panel-plugins/xfce4-mpc-plugin/default.nix index 566475869345..fa681dba7bba 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-mpc-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-mpc-plugin/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchurl, pkg-config, intltool, libxfce4util, xfce4-panel, - libxfce4ui, gtk3, exo, xfce }: + libxfce4ui, gtk3, exo, gitUpdater }: let category = "panel-plugins"; @@ -27,7 +27,10 @@ stdenv.mkDerivation rec { exo ]; - passthru.updateScript = xfce.archiveUpdater { inherit category pname version; }; + passthru.updateScript = gitUpdater { + url = "https://gitlab.xfce.org/panel-plugins/${pname}"; + rev-prefix = "${pname}-"; + }; meta = with lib; { homepage = "https://docs.xfce.org/panel-plugins/xfce4-mpc-plugin"; diff --git a/pkgs/desktops/xfce/panel-plugins/xfce4-notes-plugin/default.nix b/pkgs/desktops/xfce/panel-plugins/xfce4-notes-plugin/default.nix index 6cb2fcc66c02..0d6782dc821e 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-notes-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-notes-plugin/default.nix @@ -6,7 +6,7 @@ , xfce4-panel , libxfce4ui , xfconf -, xfce +, gitUpdater }: let @@ -31,7 +31,10 @@ in stdenv.mkDerivation rec { xfconf ]; - passthru.updateScript = xfce.archiveUpdater { inherit category pname version; }; + passthru.updateScript = gitUpdater { + url = "https://gitlab.xfce.org/panel-plugins/${pname}"; + rev-prefix = "${pname}-"; + }; meta = with lib; { homepage = "https://docs.xfce.org/panel-plugins/xfce4-notes-plugin"; diff --git a/pkgs/desktops/xfce/panel-plugins/xfce4-sensors-plugin/default.nix b/pkgs/desktops/xfce/panel-plugins/xfce4-sensors-plugin/default.nix index 22b4d8c4f40f..2e82deb2d3f1 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-sensors-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-sensors-plugin/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchurl, pkg-config, intltool, gtk3, libxfce4ui, - libxfce4util, xfce4-panel, libnotify, lm_sensors, hddtemp, netcat-gnu, xfce + libxfce4util, xfce4-panel, libnotify, lm_sensors, hddtemp, netcat-gnu, gitUpdater }: let @@ -38,7 +38,10 @@ stdenv.mkDerivation rec { "--with-pathnetcat=${netcat-gnu}/bin/netcat" ]; - passthru.updateScript = xfce.archiveUpdater { inherit category pname version; }; + passthru.updateScript = gitUpdater { + url = "https://gitlab.xfce.org/panel-plugins/${pname}"; + rev-prefix = "${pname}-"; + }; meta = with lib; { homepage = "https://docs.xfce.org/panel-plugins/xfce4-sensors-plugin"; diff --git a/pkgs/desktops/xfce/panel-plugins/xfce4-systemload-plugin/default.nix b/pkgs/desktops/xfce/panel-plugins/xfce4-systemload-plugin/default.nix index d264181bd48f..9f6d92b745ec 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-systemload-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-systemload-plugin/default.nix @@ -6,7 +6,7 @@ , xfce4-panel , libxfce4ui , xfconf -, xfce +, gitUpdater }: let @@ -31,7 +31,10 @@ in stdenv.mkDerivation rec { xfconf ]; - passthru.updateScript = xfce.archiveUpdater { inherit category pname version; }; + passthru.updateScript = gitUpdater { + url = "https://gitlab.xfce.org/panel-plugins/${pname}"; + rev-prefix = "${pname}-"; + }; meta = with lib; { homepage = "https://docs.xfce.org/panel-plugins/xfce4-systemload-plugin"; diff --git a/pkgs/desktops/xfce/panel-plugins/xfce4-timer-plugin/default.nix b/pkgs/desktops/xfce/panel-plugins/xfce4-timer-plugin/default.nix index c3cb16dfa830..96dabfbf48bd 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-timer-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-timer-plugin/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, pkg-config, intltool, libxfce4util, xfce4-panel, libxfce4ui, gtk3, hicolor-icon-theme, xfce }: +{ lib, stdenv, fetchurl, pkg-config, intltool, libxfce4util, xfce4-panel, libxfce4ui, gtk3, hicolor-icon-theme, gitUpdater }: let category = "panel-plugins"; @@ -28,7 +28,10 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; - passthru.updateScript = xfce.archiveUpdater { inherit category pname version; }; + passthru.updateScript = gitUpdater { + url = "https://gitlab.xfce.org/panel-plugins/${pname}"; + rev-prefix = "${pname}-"; + }; meta = with lib; { homepage = "https://docs.xfce.org/panel-plugins/xfce4-timer-plugin"; diff --git a/pkgs/desktops/xfce/panel-plugins/xfce4-weather-plugin/default.nix b/pkgs/desktops/xfce/panel-plugins/xfce4-weather-plugin/default.nix index 5ceda9cb8bd3..cd30b79650e3 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-weather-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-weather-plugin/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchurl, pkg-config, intltool, libxml2, libsoup, upower, - libxfce4ui, xfce4-panel, xfconf, hicolor-icon-theme, xfce }: + libxfce4ui, xfce4-panel, xfconf, hicolor-icon-theme, gitUpdater }: let category = "panel-plugins"; @@ -31,7 +31,10 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - passthru.updateScript = xfce.archiveUpdater { inherit category pname version; }; + passthru.updateScript = gitUpdater { + url = "https://gitlab.xfce.org/panel-plugins/${pname}"; + rev-prefix = "${pname}-"; + }; meta = with lib; { homepage = "https://docs.xfce.org/panel-plugins/xfce4-weather-plugin";