diff options
author | José Romildo Malaquias <malaquias@gmail.com> | 2022-02-23 18:48:24 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-23 18:48:24 -0300 |
commit | f1143cb501dad871fbd79d12c772c1bd3b5fd385 (patch) | |
tree | 5a85b71d5d232180bea923ca4ecf572f80350b89 /pkgs/desktops | |
parent | ca856a724df92b4480eb34c55489733a68b50361 (diff) | |
parent | 005ac63a1910945086e40d197164a5aae4c38090 (diff) |
Merge pull request #161144 from romildo/new.git-updater
gitUpdater: init
Diffstat (limited to 'pkgs/desktops')
23 files changed, 38 insertions, 99 deletions
diff --git a/pkgs/desktops/lxqt/default.nix b/pkgs/desktops/lxqt/default.nix index 062ca4abfe86b..5404c0c7753af 100644 --- a/pkgs/desktops/lxqt/default.nix +++ b/pkgs/desktops/lxqt/default.nix @@ -4,10 +4,9 @@ let # Update script tailored to LXQt packages from git repository lxqtUpdateScript = { pname, version, src }: - pkgs.genericUpdater { + pkgs.gitUpdater { inherit pname version; attrPath = "lxqt.${pname}"; - versionLister = "${pkgs.common-updater-scripts}/bin/list-git-tags ${src.meta.homepage}"; }; # For compiling information, see: diff --git a/pkgs/desktops/mate/default.nix b/pkgs/desktops/mate/default.nix index e9822f0242d6b..2c5b45a653e54 100644 --- a/pkgs/desktops/mate/default.nix +++ b/pkgs/desktops/mate/default.nix @@ -7,10 +7,9 @@ let # Update script tailored to mate packages from git repository mateUpdateScript = { pname, version, odd-unstable ? true, url ? "https://pub.mate-desktop.org/releases" }: - pkgs.genericUpdater { - inherit pname version odd-unstable; + pkgs.httpTwoLevelsUpdater { + inherit pname version odd-unstable url; attrPath = "mate.${pname}"; - versionLister = "${pkgs.common-updater-scripts}/bin/list-archive-two-level-versions ${url}"; }; atril = callPackage ./atril { }; diff --git a/pkgs/desktops/mate/mate-tweak/default.nix b/pkgs/desktops/mate/mate-tweak/default.nix index ebac46692c01b..e0fc06135e198 100644 --- a/pkgs/desktops/mate/mate-tweak/default.nix +++ b/pkgs/desktops/mate/mate-tweak/default.nix @@ -9,8 +9,7 @@ , gobject-introspection , wrapGAppsHook , glib -, genericUpdater -, common-updater-scripts +, gitUpdater }: python3Packages.buildPythonApplication rec { @@ -74,10 +73,9 @@ python3Packages.buildPythonApplication rec { done ''; - passthru.updateScript = genericUpdater { + passthru.updateScript = gitUpdater { inherit pname version; attrPath = "mate.${pname}"; - versionLister = "${common-updater-scripts}/bin/list-git-tags ${src.meta.homepage}"; }; meta = with lib; { diff --git a/pkgs/desktops/xfce/applications/orage/default.nix b/pkgs/desktops/xfce/applications/orage/default.nix index f38dacf0dbbce..4e5028a6a599b 100644 --- a/pkgs/desktops/xfce/applications/orage/default.nix +++ b/pkgs/desktops/xfce/applications/orage/default.nix @@ -38,10 +38,9 @@ stdenv.mkDerivation rec { }) ]; - passthru.updateScript = xfce.updateScript { + passthru.updateScript = xfce.archiveUpdater { + category = "apps"; inherit pname version; - attrPath = "xfce.${pname}"; - versionLister = xfce.archiveLister "apps" pname; }; meta = with lib; { diff --git a/pkgs/desktops/xfce/art/xfce4-icon-theme/default.nix b/pkgs/desktops/xfce/art/xfce4-icon-theme/default.nix index 8c4dff80747db..8c37dde65ccb2 100644 --- a/pkgs/desktops/xfce/art/xfce4-icon-theme/default.nix +++ b/pkgs/desktops/xfce/art/xfce4-icon-theme/default.nix @@ -28,11 +28,7 @@ stdenv.mkDerivation rec { dontDropIconThemeCache = true; - passthru.updateScript = xfce.updateScript { - inherit pname version; - attrPath = "xfce.${pname}"; - versionLister = xfce.archiveLister category pname; - }; + passthru.updateScript = xfce.archiveUpdater { inherit category pname version; }; 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 2c84c619c64f9..3665263ede05c 100644 --- a/pkgs/desktops/xfce/art/xfwm4-themes/default.nix +++ b/pkgs/desktops/xfce/art/xfwm4-themes/default.nix @@ -13,11 +13,7 @@ stdenv.mkDerivation rec { sha256 = "sha256-MhTV8A6XA7XoyefDKH1gbe3scoXOtNXbMy6TraZv1XU="; }; - passthru.updateScript = xfce.updateScript { - inherit pname version; - attrPath = "xfce.${pname}"; - versionLister = xfce.archiveLister category pname; - }; + passthru.updateScript = xfce.archiveUpdater { inherit category pname version; }; meta = with lib; { homepage = "https://www.xfce.org/"; diff --git a/pkgs/desktops/xfce/default.nix b/pkgs/desktops/xfce/default.nix index 2340a57c22d82..1ec4cec5b31d5 100644 --- a/pkgs/desktops/xfce/default.nix +++ b/pkgs/desktops/xfce/default.nix @@ -3,13 +3,14 @@ lib.makeScope pkgs.newScope (self: with self; { #### NixOS support - updateScript = pkgs.genericUpdater; + genericUpdater = pkgs.genericUpdater; - gitLister = url: - "${pkgs.common-updater-scripts}/bin/list-git-tags ${url}"; - - archiveLister = category: name: - "${pkgs.common-updater-scripts}/bin/list-archive-two-level-versions https://archive.xfce.org/src/${category}/${name}"; + archiveUpdater = { category, pname, version }: + pkgs.httpTwoLevelsUpdater { + inherit pname version; + attrPath = "xfce.${pname}"; + url = "https://archive.xfce.org/src/${category}/${pname}"; + }; mkXfceDerivation = callPackage ./mkXfceDerivation.nix { }; diff --git a/pkgs/desktops/xfce/mkXfceDerivation.nix b/pkgs/desktops/xfce/mkXfceDerivation.nix index 8ff0d83cae387..261178381e4e2 100644 --- a/pkgs/desktops/xfce/mkXfceDerivation.nix +++ b/pkgs/desktops/xfce/mkXfceDerivation.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitLab, pkg-config, xfce4-dev-tools, hicolor-icon-theme, xfce, wrapGAppsHook }: +{ lib, stdenv, fetchFromGitLab, pkg-config, xfce4-dev-tools, hicolor-icon-theme, xfce, wrapGAppsHook, gitUpdater }: { category , pname @@ -41,9 +41,8 @@ let pos = builtins.unsafeGetAttrPos "pname" args; - passthru.updateScript = xfce.updateScript { + passthru.updateScript = gitUpdater { inherit pname version attrPath rev-prefix odd-unstable patchlevel-unstable; - versionLister = xfce.gitLister src.meta.homepage; }; meta = with lib; { diff --git a/pkgs/desktops/xfce/panel-plugins/xfce4-cpugraph-plugin/default.nix b/pkgs/desktops/xfce/panel-plugins/xfce4-cpugraph-plugin/default.nix index dd74a0653b8dc..33bdb052b6a9e 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-cpugraph-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-cpugraph-plugin/default.nix @@ -45,11 +45,7 @@ in stdenv.mkDerivation rec { hicolor-icon-theme ]; - passthru.updateScript = xfce.updateScript { - inherit pname version; - attrPath = "xfce.${pname}"; - versionLister = xfce.archiveLister category pname; - }; + passthru.updateScript = xfce.archiveUpdater { inherit category pname version; }; meta = with lib; { homepage = "https://docs.xfce.org/panel-plugins/xfce4-cpugraph-plugin"; 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 76868bcd550ac..cc4ce861e7246 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-embed-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-embed-plugin/default.nix @@ -33,11 +33,7 @@ in stdenv.mkDerivation rec { gtk2 ]; - passthru.updateScript = xfce.updateScript { - inherit pname version; - attrPath = "xfce.${pname}"; - versionLister = xfce.archiveLister category pname; - }; + passthru.updateScript = xfce.archiveUpdater { inherit category pname version; }; 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 3ee90788137ed..08434ad25227f 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-eyes-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-eyes-plugin/default.nix @@ -35,11 +35,7 @@ in stdenv.mkDerivation rec { gtk3 ]; - passthru.updateScript = xfce.updateScript { - inherit pname version; - attrPath = "xfce.${pname}"; - versionLister = xfce.archiveLister category pname; - }; + passthru.updateScript = xfce.archiveUpdater { inherit category pname version; }; 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 084cb764c627e..81498aea96f4b 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-fsguard-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-fsguard-plugin/default.nix @@ -35,11 +35,7 @@ in stdenv.mkDerivation rec { gtk3 ]; - passthru.updateScript = xfce.updateScript { - inherit pname version; - attrPath = "xfce.${pname}"; - versionLister = xfce.archiveLister category pname; - }; + passthru.updateScript = xfce.archiveUpdater { inherit category pname version; }; 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 9700d515fbcab..1b794ff2b8364 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-genmon-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-genmon-plugin/default.nix @@ -33,11 +33,7 @@ in stdenv.mkDerivation rec { gtk3 ]; - passthru.updateScript = xfce.updateScript { - inherit pname version; - attrPath = "xfce.${pname}"; - versionLister = xfce.archiveLister category pname; - }; + passthru.updateScript = xfce.archiveUpdater { inherit category pname version; }; 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 455370ca38bbc..fdd3af5fe402f 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-mailwatch-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-mailwatch-plugin/default.nix @@ -27,11 +27,7 @@ stdenv.mkDerivation rec { libgcrypt ]; - passthru.updateScript = xfce.updateScript { - inherit pname version; - attrPath = "xfce.${pname}"; - versionLister = xfce.archiveLister category pname; - }; + passthru.updateScript = xfce.archiveUpdater { inherit category pname version; }; 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 1f935ac4a4d4e..566475869345f 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-mpc-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-mpc-plugin/default.nix @@ -27,11 +27,7 @@ stdenv.mkDerivation rec { exo ]; - passthru.updateScript = xfce.updateScript { - inherit pname version; - attrPath = "xfce.${pname}"; - versionLister = xfce.archiveLister category pname; - }; + passthru.updateScript = xfce.archiveUpdater { inherit category pname version; }; meta = with lib; { homepage = "https://docs.xfce.org/panel-plugins/xfce4-mpc-plugin"; diff --git a/pkgs/desktops/xfce/panel-plugins/xfce4-namebar-plugin/default.nix b/pkgs/desktops/xfce/panel-plugins/xfce4-namebar-plugin/default.nix index ec64a60fb54aa..e7f20a0ec7a8b 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-namebar-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-namebar-plugin/default.nix @@ -1,5 +1,7 @@ { lib, stdenv, pkg-config, fetchFromGitHub, python3, vala -, gtk3, libwnck, libxfce4util, xfce4-panel, wafHook, xfce }: +, gtk3, libwnck, libxfce4util, xfce4-panel, wafHook, xfce +, gitUpdater +}: stdenv.mkDerivation rec { pname = "xfce4-namebar-plugin"; @@ -20,10 +22,9 @@ stdenv.mkDerivation rec { substituteInPlace src/preferences.vala --replace 'var dir_strings = Environment.get_system_data_dirs()' "string[] dir_strings = { \"$out/share\" }" ''; - passthru.updateScript = xfce.updateScript { + passthru.updateScript = gitUpdater { inherit pname version; attrPath = "xfce.${pname}"; - versionLister = xfce.gitLister src.meta.homepage; rev-prefix = "v"; }; 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 c2a7aa694d7d9..6cb2fcc66c020 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-notes-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-notes-plugin/default.nix @@ -31,11 +31,7 @@ in stdenv.mkDerivation rec { xfconf ]; - passthru.updateScript = xfce.updateScript { - inherit pname version; - attrPath = "xfce.${pname}"; - versionLister = xfce.archiveLister category pname; - }; + passthru.updateScript = xfce.archiveUpdater { inherit category pname version; }; 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 c45fba5ebd795..22b4d8c4f40f9 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-sensors-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-sensors-plugin/default.nix @@ -38,11 +38,7 @@ stdenv.mkDerivation rec { "--with-pathnetcat=${netcat-gnu}/bin/netcat" ]; - passthru.updateScript = xfce.updateScript { - inherit pname version; - attrPath = "xfce.${pname}"; - versionLister = xfce.archiveLister category pname; - }; + passthru.updateScript = xfce.archiveUpdater { inherit category pname version; }; 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 7236eb97d6de9..d264181bd48fc 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-systemload-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-systemload-plugin/default.nix @@ -31,11 +31,7 @@ in stdenv.mkDerivation rec { xfconf ]; - passthru.updateScript = xfce.updateScript { - inherit pname version; - attrPath = "xfce.${pname}"; - versionLister = xfce.archiveLister category pname; - }; + passthru.updateScript = xfce.archiveUpdater { inherit category pname version; }; 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 35840b9d244be..c3cb16dfa830e 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-timer-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-timer-plugin/default.nix @@ -28,11 +28,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; - passthru.updateScript = xfce.updateScript { - inherit pname version; - attrPath = "xfce.${pname}"; - versionLister = xfce.archiveLister category pname; - }; + passthru.updateScript = xfce.archiveUpdater { inherit category pname version; }; 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 4ce0fae5a391a..5ceda9cb8bd38 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-weather-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-weather-plugin/default.nix @@ -31,11 +31,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - passthru.updateScript = xfce.updateScript { - inherit pname version; - attrPath = "xfce.${pname}"; - versionLister = xfce.archiveLister category pname; - }; + passthru.updateScript = xfce.archiveUpdater { inherit category pname version; }; meta = with lib; { homepage = "https://docs.xfce.org/panel-plugins/xfce4-weather-plugin"; diff --git a/pkgs/desktops/xfce/panel-plugins/xfce4-windowck-plugin/default.nix b/pkgs/desktops/xfce/panel-plugins/xfce4-windowck-plugin/default.nix index 6a2386e0f89e1..5e5e6c8aa694e 100644 --- a/pkgs/desktops/xfce/panel-plugins/xfce4-windowck-plugin/default.nix +++ b/pkgs/desktops/xfce/panel-plugins/xfce4-windowck-plugin/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, pkg-config, intltool, python3, imagemagick, libwnck, libxfce4ui, xfce4-panel, xfconf, xfce4-dev-tools, xfce }: +{ lib, stdenv, fetchFromGitHub, pkg-config, intltool, python3, imagemagick, libwnck, libxfce4ui, xfce4-panel, xfconf, xfce4-dev-tools, xfce, gitUpdater }: stdenv.mkDerivation rec { pname = "xfce4-windowck-plugin"; @@ -33,10 +33,9 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - passthru.updateScript = xfce.updateScript { + passthru.updateScript = gitUpdater { inherit pname version; attrPath = "xfce.${pname}"; - versionLister = xfce.gitLister src.meta.homepage; rev-prefix = "v"; }; diff --git a/pkgs/desktops/xfce/thunar-plugins/dropbox/default.nix b/pkgs/desktops/xfce/thunar-plugins/dropbox/default.nix index 75ef2491fe15d..e056c90a55020 100644 --- a/pkgs/desktops/xfce/thunar-plugins/dropbox/default.nix +++ b/pkgs/desktops/xfce/thunar-plugins/dropbox/default.nix @@ -6,6 +6,7 @@ , cmake , ninja , xfce +, gitUpdater }: stdenv.mkDerivation rec { @@ -30,10 +31,9 @@ stdenv.mkDerivation rec { gtk3 ]; - passthru.updateScript = xfce.updateScript { + passthru.updateScript = gitUpdater { inherit pname version; attrPath = "xfce.thunar-dropbox-plugin"; - versionLister = xfce.gitLister src.meta.homepage; }; meta = with lib; { |