httpTwoLevelsUpdater: init

main
José Romildo 2 years ago
parent ba59355e81
commit 005ac63a19
  1. 19
      pkgs/common-updater/http-two-levels-updater.nix
  2. 22
      pkgs/common-updater/scripts/list-archive-two-levels-versions
  3. 5
      pkgs/desktops/mate/default.nix
  4. 5
      pkgs/desktops/xfce/applications/orage/default.nix
  5. 6
      pkgs/desktops/xfce/art/xfce4-icon-theme/default.nix
  6. 6
      pkgs/desktops/xfce/art/xfwm4-themes/default.nix
  7. 8
      pkgs/desktops/xfce/default.nix
  8. 6
      pkgs/desktops/xfce/panel-plugins/xfce4-cpugraph-plugin/default.nix
  9. 6
      pkgs/desktops/xfce/panel-plugins/xfce4-embed-plugin/default.nix
  10. 6
      pkgs/desktops/xfce/panel-plugins/xfce4-eyes-plugin/default.nix
  11. 6
      pkgs/desktops/xfce/panel-plugins/xfce4-fsguard-plugin/default.nix
  12. 6
      pkgs/desktops/xfce/panel-plugins/xfce4-genmon-plugin/default.nix
  13. 6
      pkgs/desktops/xfce/panel-plugins/xfce4-mailwatch-plugin/default.nix
  14. 6
      pkgs/desktops/xfce/panel-plugins/xfce4-mpc-plugin/default.nix
  15. 6
      pkgs/desktops/xfce/panel-plugins/xfce4-notes-plugin/default.nix
  16. 6
      pkgs/desktops/xfce/panel-plugins/xfce4-sensors-plugin/default.nix
  17. 6
      pkgs/desktops/xfce/panel-plugins/xfce4-systemload-plugin/default.nix
  18. 6
      pkgs/desktops/xfce/panel-plugins/xfce4-timer-plugin/default.nix
  19. 6
      pkgs/desktops/xfce/panel-plugins/xfce4-weather-plugin/default.nix
  20. 2
      pkgs/top-level/all-packages.nix

@ -0,0 +1,19 @@
{ lib
, genericUpdater
, common-updater-scripts
}:
{ pname
, version
, attrPath ? pname
, ignoredVersions ? ""
, rev-prefix ? ""
, odd-unstable ? false
, patchlevel-unstable ? false
, url ? null
}:
genericUpdater {
inherit pname version attrPath ignoredVersions rev-prefix odd-unstable patchlevel-unstable;
versionLister = "${common-updater-scripts}/bin/list-archive-two-levels-versions ${lib.optionalString (url != null) "--url=${url}"}";
}

@ -2,9 +2,9 @@
# lists all available versions listed for a package in a site (http)
archive="$1" # archive url
pname="$2" # package name
file="$3" # file for writing debugging information
archive="" # archive url
pname="" # package name
file="" # file for writing debugging information
while (( $# > 0 )); do
flag="$1"
@ -17,7 +17,7 @@ while (( $# > 0 )); do
pname="${flag#*=}"
;;
--file=*)
version="${flag#*=}"
file="${flag#*=}"
;;
*)
echo "$0: unknown option ‘${flag}’"
@ -26,13 +26,19 @@ while (( $# > 0 )); do
esac
done
if [ -z "$archive" ]; then
echo "$scriptName: Missing archive url"
exit 1
# by default set url to the base dir of the first url in src.urls
if [[ -z "$archive" ]]; then
archive="$(nix-instantiate $systemArg --eval -E \
"with import ./. {}; dirOf (dirOf (lib.head $UPDATE_NIX_ATTR_PATH.src.urls))" \
| tr -d '"')"
fi
if [[ -z "$pname" ]]; then
pname="$UPDATE_NIX_ATTR_PATH"
fi
# print a debugging message
if [ -n "$file" ]; then
if [[ -n "$file" ]]; then
echo "# Listing versions for '$pname' at $archive" >> $file
fi

@ -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=${url}";
};
atril = callPackage ./atril { };

@ -38,10 +38,9 @@ stdenv.mkDerivation rec {
})
];
passthru.updateScript = xfce.genericUpdater {
passthru.updateScript = xfce.archiveUpdater {
category = "apps";
inherit pname version;
attrPath = "xfce.${pname}";
versionLister = xfce.archiveLister "apps" pname;
};
meta = with lib; {

@ -28,11 +28,7 @@ stdenv.mkDerivation rec {
dontDropIconThemeCache = true;
passthru.updateScript = xfce.genericUpdater {
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/";

@ -13,11 +13,7 @@ stdenv.mkDerivation rec {
sha256 = "sha256-MhTV8A6XA7XoyefDKH1gbe3scoXOtNXbMy6TraZv1XU=";
};
passthru.updateScript = xfce.genericUpdater {
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/";

@ -5,8 +5,12 @@ lib.makeScope pkgs.newScope (self: with self; {
genericUpdater = pkgs.genericUpdater;
archiveLister = category: name:
"${pkgs.common-updater-scripts}/bin/list-archive-two-level-versions --url=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 { };

@ -45,11 +45,7 @@ in stdenv.mkDerivation rec {
hicolor-icon-theme
];
passthru.updateScript = xfce.genericUpdater {
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";

@ -33,11 +33,7 @@ in stdenv.mkDerivation rec {
gtk2
];
passthru.updateScript = xfce.genericUpdater {
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";

@ -35,11 +35,7 @@ in stdenv.mkDerivation rec {
gtk3
];
passthru.updateScript = xfce.genericUpdater {
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";

@ -35,11 +35,7 @@ in stdenv.mkDerivation rec {
gtk3
];
passthru.updateScript = xfce.genericUpdater {
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";

@ -33,11 +33,7 @@ in stdenv.mkDerivation rec {
gtk3
];
passthru.updateScript = xfce.genericUpdater {
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";

@ -27,11 +27,7 @@ stdenv.mkDerivation rec {
libgcrypt
];
passthru.updateScript = xfce.genericUpdater {
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";

@ -27,11 +27,7 @@ stdenv.mkDerivation rec {
exo
];
passthru.updateScript = xfce.genericUpdater {
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";

@ -31,11 +31,7 @@ in stdenv.mkDerivation rec {
xfconf
];
passthru.updateScript = xfce.genericUpdater {
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";

@ -38,11 +38,7 @@ stdenv.mkDerivation rec {
"--with-pathnetcat=${netcat-gnu}/bin/netcat"
];
passthru.updateScript = xfce.genericUpdater {
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";

@ -31,11 +31,7 @@ in stdenv.mkDerivation rec {
xfconf
];
passthru.updateScript = xfce.genericUpdater {
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";

@ -28,11 +28,7 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "format" ];
passthru.updateScript = xfce.genericUpdater {
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";

@ -31,11 +31,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
passthru.updateScript = xfce.genericUpdater {
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";

@ -109,6 +109,8 @@ with pkgs;
gitUpdater = callPackage ../common-updater/git-updater.nix { };
httpTwoLevelsUpdater = callPackage ../common-updater/http-two-levels-updater.nix { };
unstableGitUpdater = callPackage ../common-updater/unstable-updater.nix { };
nix-update-script = callPackage ../common-updater/nix-update.nix { };

Loading…
Cancel
Save