Merge pull request #161144 from romildo/new.git-updater

gitUpdater: init
This commit is contained in:
José Romildo Malaquias 2022-02-23 18:48:24 -03:00 committed by GitHub
commit f1143cb501
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
48 changed files with 197 additions and 199 deletions

View File

@ -1,8 +1,7 @@
{ lib
, fetchFromGitHub
, genericUpdater
, gitUpdater
, substituteAll
, common-updater-scripts
, ffmpeg
, python3Packages
, sox
@ -33,12 +32,7 @@ python3Packages.buildPythonApplication rec {
# sandbox to be disabled.
doCheck = false;
passthru = {
updateScript = genericUpdater {
inherit pname version;
versionLister = "${common-updater-scripts}/bin/list-git-tags ${src.meta.homepage}";
};
};
passthru.updateScript = gitUpdater { inherit pname version; };
meta = with lib; {
description = "Fast audio loudness scanner & tagger (ReplayGain v2 / R128)";

View File

@ -26,7 +26,7 @@ getRepo() {
}
getLatestVersionTag() {
"$nixpkgs"/pkgs/common-updater/scripts/list-git-tags https://github.com/$(getRepo) 2>/dev/null \
"$nixpkgs"/pkgs/common-updater/scripts/list-git-tags --url=https://github.com/$(getRepo) 2>/dev/null \
| sort -V | tail -1 | sed 's|^v||'
}

View File

@ -1,8 +1,7 @@
{ lib
, buildGoModule
, fetchFromGitHub
, genericUpdater
, common-updater-scripts
, gitUpdater
, makeWrapper
, openssh
}:
@ -25,9 +24,8 @@ buildGoModule rec {
ldflags = [ "-s" "-w" "-X main.AgentVersion=v${version}" ];
passthru = {
updateScript = genericUpdater {
updateScript = gitUpdater {
inherit pname version;
versionLister = "${common-updater-scripts}/bin/list-git-tags ${src.meta.homepage}";
rev-prefix = "v";
ignoredVersions = ".(rc|beta).*";
};

View File

@ -4,8 +4,7 @@
, pbr
, requests
, setuptools
, genericUpdater
, common-updater-scripts
, gitUpdater
}:
buildPythonApplication rec {
@ -42,10 +41,7 @@ buildPythonApplication rec {
pythonImportsCheck = [ "git_review" ];
passthru.updateScript = genericUpdater {
inherit pname version;
versionLister = "${common-updater-scripts}/bin/list-git-tags ${src.meta.homepage}";
};
passthru.updateScript = gitUpdater { inherit pname version; };
meta = with lib; {
description = "Tool to submit code to Gerrit";

View File

@ -13,7 +13,7 @@ let
inherit pname version;
attrPath = lib.toLower pname;
rev-prefix = "v";
versionLister = "${common-updater-scripts}/bin/list-git-tags ${homepage}";
versionLister = "${common-updater-scripts}/bin/list-git-tags --url=${homepage}";
};
updateScript = builtins.elemAt updater 0;
updateArgs = map (lib.escapeShellArg) (builtins.tail updater);

View File

@ -17,7 +17,7 @@ let
# exclude prerelease versions
versionLister = writers.writeBash "list-mirakurun-versions" ''
${common-updater-scripts}/bin/list-git-tags ${homepage} \
${common-updater-scripts}/bin/list-git-tags --url=${homepage} \
| grep '^[0-9]\+\.[0-9]\+\.[0-9]\+$'
'';
};

View File

@ -17,8 +17,7 @@
, qtgraphicaleffects
, qmake
, qttools
, genericUpdater
, common-updater-scripts
, gitUpdater
}:
assert lib.versionAtLeast mlt.version "6.24.0";
@ -76,9 +75,8 @@ mkDerivation rec {
cp -r src/qml $out/share/shotcut/
'';
passthru.updateScript = genericUpdater {
passthru.updateScript = gitUpdater {
inherit pname version;
versionLister = "${common-updater-scripts}/bin/list-git-tags ${src.meta.homepage}";
rev-prefix = "v";
};

View File

@ -55,7 +55,7 @@ let
return 1
}
tags=$($version_lister $pname ${fileForGitCommands}) || exit 1
tags=$($version_lister --pname=${pname} --file="${fileForGitCommands}") || exit 1
# print available tags
for tag in $tags; do

View File

@ -0,0 +1,17 @@
{ genericUpdater
, common-updater-scripts
}:
{ pname
, version
, attrPath ? pname
, ignoredVersions ? ""
, rev-prefix ? ""
, odd-unstable ? false
, patchlevel-unstable ? false
}:
genericUpdater {
inherit pname version attrPath ignoredVersions rev-prefix odd-unstable patchlevel-unstable;
versionLister = "${common-updater-scripts}/bin/list-git-tags";
}

View File

@ -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}"}";
}

View File

@ -1,35 +0,0 @@
#!/usr/bin/env bash
# lists all available versions listed for a package in a site (http)
scriptName=list-archive-two-level-versions # do not use the .wrapped name
usage() {
echo "Usage: $scriptName <archive url> [<package name> [<debug file path>]]"
}
archive="$1" # archive url
pname="$2" # package name
file="$3" # file for writing debugging information
if [ -z "$archive" ]; then
echo "$scriptName: Missing archive url"
usage
exit 1
fi
# print a debugging message
if [ -n "$file" ]; then
echo "# Listing versions for $pname at $archive" >> $file
fi
# list all major-minor versions from archive
tags1=$(curl -sS "$archive/")
tags1=$(echo "$tags1" | sed -rne 's,^<a href="([0-9]+\.[0-9]+)/">.*,\1,p')
# print available versions
for tag in $tags1; do
tags2=$(curl -sS "$archive/$tag/")
tags2=$(echo "$tags2" | sed -rne "s,^<a href=\"$pname-([0-9.]+)\\.[^0-9].*\">.*,\\1,p")
echo "$tags2"
done

View File

@ -0,0 +1,54 @@
#!/usr/bin/env bash
# lists all available versions listed for a package in a site (http)
archive="" # archive url
pname="" # package name
file="" # file for writing debugging information
while (( $# > 0 )); do
flag="$1"
shift 1
case "$flag" in
--url=*)
archive="${flag#*=}"
;;
--pname=*)
pname="${flag#*=}"
;;
--file=*)
file="${flag#*=}"
;;
*)
echo "$0: unknown option ${flag}"
exit 1
;;
esac
done
# 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
echo "# Listing versions for '$pname' at $archive" >> $file
fi
# list all major-minor versions from archive
tags1=$(curl -sS "$archive/")
tags1=$(echo "$tags1" | sed -rne 's,^<a href="([0-9]+\.[0-9]+)/">.*,\1,p')
# print available versions
for tag in $tags1; do
tags2=$(curl -sS "$archive/$tag/")
tags2=$(echo "$tags2" | sed -rne "s,^<a href=\"$pname-([0-9.]+)\\.[^0-9].*\">.*,\\1,p")
echo "$tags2"
done

View File

@ -2,29 +2,50 @@
# lists all available tags from a git repository
scriptName=list-git-tags # do not use the .wrapped name
echo "# pname=$UPDATE_NIX_ATTR_PATH" > /tmp/test.txt
usage() {
echo "Usage: $scriptName <repository url> [<package name> [<debug file path>]]"
}
url="" # git repository url
pname="" # package name
file="" # file for writing debugging information
repo="$1" # git repository url
pname="$2" # package name
file="$3" # file for writing debugging information
while (( $# > 0 )); do
flag="$1"
shift 1
case "$flag" in
--url=*)
url="${flag#*=}"
;;
--pname=*)
pname="${flag#*=}"
;;
--file=*)
file="${flag#*=}"
;;
*)
echo "$0: unknown option ${flag}"
exit 1
;;
esac
done
if [ -z "$repo" ]; then
echo "$scriptName: Missing git repository url"
usage
exit 1
# By default we set url to src.url or src.meta.homepage
if [[ -z "$url" ]]; then
url="$(nix-instantiate $systemArg --eval -E \
"with import ./. {}; $UPDATE_NIX_ATTR_PATH.src.url or $UPDATE_NIX_ATTR_PATH.src.meta.homepage" \
| tr -d '"')"
fi
if [[ -z "$pname" ]]; then
pname="$UPDATE_NIX_ATTR_PATH"
fi
# print a debugging message
if [ -n "$file" ]; then
echo "# Listing tags for $pname at $repo" >> $file
if [[ -n "$file" ]]; then
echo "# Listing tags for '$pname' at $url" >> $file
fi
# list all tags from the remote repository
tags=$(git ls-remote --tags --refs "$repo")
tags=$(git ls-remote --tags --refs "$url")
# keep only the version part of the tag
tags=$(echo "$tags" | cut --delimiter=/ --field=3)

View File

@ -8,7 +8,7 @@ repo=https://github.com/be5invis/Iosevka
# Discover the latest version.
current_version=$(nix-instantiate "$nixpkgs" --eval --strict -A iosevka.version | tr -d '"')
new_version=$(list-git-tags "$repo" | sort --reverse --version-sort | awk 'match($0, /^v([0-9.]+)$/, m) { print m[1]; exit; }')
new_version=$(list-git-tags --url="$repo" | sort --reverse --version-sort | awk 'match($0, /^v([0-9.]+)$/, m) { print m[1]; exit; }')
if [[ "$new_version" == "$current_version" ]]; then
echo "iosevka: no update found"
exit

View File

@ -5,6 +5,7 @@
, gtk-engine-murrine
, gtk_engines
, librsvg
, gitUpdater
}:
stdenv.mkDerivation rec {
@ -37,6 +38,8 @@ stdenv.mkDerivation rec {
runHook postInstall
'';
passthru.updateScript = gitUpdater {inherit pname version; };
meta = with lib; {
description = "GTK theme supporting Budgie, Pantheon, Mate, Xfce4 and GNOME desktops";
homepage = "https://www.pling.com/p/1239855/";

View File

@ -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:

View File

@ -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 { };

View File

@ -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; {

View File

@ -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; {

View File

@ -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/";

View File

@ -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/";

View File

@ -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 { };

View File

@ -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; {

View File

@ -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";

View File

@ -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";

View File

@ -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";

View File

@ -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";

View File

@ -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";

View File

@ -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";

View File

@ -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";

View File

@ -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";
};

View File

@ -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";

View File

@ -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";

View File

@ -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";

View File

@ -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";

View File

@ -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";

View File

@ -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";
};

View File

@ -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; {

View File

@ -24,7 +24,7 @@ in rebar3Relx rec {
set -euo pipefail
latest=$(list-git-tags https://github.com/${owner}/${repo}.git | sort -V | tail -1)
latest=$(list-git-tags --url=https://github.com/${owner}/${repo}.git | sort -V | tail -1)
if [ "$latest" != "${version}" ]; then
nixpkgs="$(git rev-parse --show-toplevel)"
nix_path="$nixpkgs/pkgs/development/beam-modules/elvis-erlang"

View File

@ -51,7 +51,7 @@ rebar3Relx {
#! nix-shell -i bash -p common-updater-scripts coreutils git gnused gnutar gzip "rebar3WithPlugins { globalPlugins = [ beamPackages.rebar3-nix ]; }"
set -ox errexit
latest=$(list-git-tags https://github.com/${owner}/${repo}.git | sed -n '/[\d\.]\+/p' | sort -V | tail -1)
latest=$(list-git-tags --url=https://github.com/${owner}/${repo}.git | sed -n '/[\d\.]\+/p' | sort -V | tail -1)
if [[ "$latest" != "${version}" ]]; then
nixpkgs="$(git rev-parse --show-toplevel)"
nix_path="$nixpkgs/pkgs/development/beam-modules/erlang-ls"

View File

@ -154,7 +154,7 @@ stdenv.mkDerivation ({
#!${stdenv.shell}
set -ox errexit
PATH=${lib.makeBinPath [ common-updater-scripts coreutils git gnused ]}
latest=$(list-git-tags https://github.com/erlang/otp.git | sed -n 's/^OTP-${major}/${major}/p' | sort -V | tail -1)
latest=$(list-git-tags --url=https://github.com/erlang/otp.git | sed -n 's/^OTP-${major}/${major}/p' | sort -V | tail -1)
if [ "$latest" != "${version}" ]; then
nixpkgs="$(git rev-parse --show-toplevel)"
nix_file="$nixpkgs/pkgs/development/interpreters/erlang/R${major}.nix"

View File

@ -1,7 +1,7 @@
{ lib, stdenv, fetchFromGitLab, pkg-config
, qmake, qtbase, qtdeclarative, wrapQtAppsHook
, glib, gobject-introspection
, genericUpdater, common-updater-scripts
, gitUpdater
}:
stdenv.mkDerivation rec {
@ -55,10 +55,9 @@ stdenv.mkDerivation rec {
done
'';
passthru.updateScript = genericUpdater {
passthru.updateScript = gitUpdater {
inherit pname version;
rev-prefix = "v";
versionLister = "${common-updater-scripts}/bin/list-git-tags ${src.meta.homepage}";
};
meta = with lib; {

View File

@ -10,8 +10,7 @@
, pcre2
# update script
, genericUpdater
, common-updater-scripts
, gitUpdater
}:
stdenv.mkDerivation rec {
@ -40,9 +39,8 @@ stdenv.mkDerivation rec {
"-DCMAKE_BUILD_TYPE:String=Release"
];
passthru.updateScript = genericUpdater {
passthru.updateScript = gitUpdater {
inherit pname version;
versionLister = "${common-updater-scripts}/bin/list-git-tags ${src.meta.homepage}";
rev-prefix = "v";
};

View File

@ -1,7 +1,7 @@
{ lib, stdenv, fetchFromGitHub, makeWrapper
, SDL, ffmpeg_4, frei0r, libjack2, libdv, libsamplerate, libexif
, libvorbis, libxml2, movit, pkg-config, sox, fftw, opencv4, SDL2
, gtk2, genericUpdater, common-updater-scripts, libebur128
, gtk2, gitUpdater, libebur128
, jack2, ladspa-sdk, swig, which, ncurses
, enablePython ? false, python3
}:
@ -51,9 +51,8 @@ stdenv.mkDerivation rec {
sed -i ${outPythonPath}/mlt/__init__.py -e "s|return importlib.import_module('_mlt')|return importlib.import_module('mlt._mlt')|g"
'';
passthru.updateScript = genericUpdater {
passthru.updateScript = gitUpdater {
inherit pname version;
versionLister = "${common-updater-scripts}/bin/list-git-tags ${src.meta.homepage}";
rev-prefix = "v";
};

View File

@ -18,8 +18,7 @@
, vid-stab
, opencv3
, ladspa-sdk
, genericUpdater
, common-updater-scripts
, gitUpdater
, ladspaPlugins
, mkDerivation
, which
@ -70,9 +69,8 @@ mkDerivation rec {
inherit ffmpeg;
};
passthru.updateScript = genericUpdater {
passthru.updateScript = gitUpdater {
inherit pname version;
versionLister = "${common-updater-scripts}/bin/list-git-tags ${src.meta.homepage}";
rev-prefix = "v";
};

View File

@ -81,7 +81,7 @@ let
(rebar3WithPlugins { globalPlugins = [rebar3-nix]; })
]
}
latest=$(list-git-tags https://github.com/${owner}/${pname}.git | sed -n '/[\d\.]\+/p' | sort -V | tail -1)
latest=$(list-git-tags --url=https://github.com/${owner}/${pname}.git | sed -n '/[\d\.]\+/p' | sort -V | tail -1)
if [ "$latest" != "${version}" ]; then
nixpkgs="$(git rev-parse --show-toplevel)"
nix_path="$nixpkgs/pkgs/development/tools/build-managers/rebar3"

View File

@ -1,8 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, genericUpdater
, common-updater-scripts
, gitUpdater
, autoreconfHook
}:
@ -19,10 +18,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook ];
passthru.updateScript = genericUpdater {
inherit pname version;
versionLister = "${common-updater-scripts}/bin/list-git-tags ${src.meta.homepage}";
};
passthru.updateScript = gitUpdater { inherit pname version; };
meta = {
description = "SCSI Tape Encryption Manager";

View File

@ -107,6 +107,10 @@ with pkgs;
genericUpdater = callPackage ../common-updater/generic-updater.nix { };
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 { };