nixpkgs/pkgs/common-updater/git-updater.nix
Sergei Trofimovich 219ca58452 gitUpdater: add explicit url parameter to specify a git tree for tags
That way gitUpdater could be used to extract most recent published
releases for .nix files that don't use git directly to define builds.

An example is iproute2 package which does not have a single place
to lookup most recent release.
2022-04-01 18:10:45 +01:00

22 lines
548 B
Nix

{ lib
, genericUpdater
, common-updater-scripts
}:
{ pname
, version
, attrPath ? pname
, ignoredVersions ? ""
, rev-prefix ? ""
, odd-unstable ? false
, patchlevel-unstable ? false
# explicit url is useful when git protocol is used only for tags listing
# while actual release is referred by tarball
, url ? null
}:
genericUpdater {
inherit pname version attrPath ignoredVersions rev-prefix odd-unstable patchlevel-unstable;
versionLister = "${common-updater-scripts}/bin/list-git-tags ${lib.optionalString (url != null) "--url=${url}"}";
}