Merge pull request #203203 from trofi/xterm-update

xterm: 375 -> 377
This commit is contained in:
Sergei Trofimovich 2022-12-01 08:40:26 +00:00 committed by GitHub
commit 12c758b069
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,17 +1,17 @@
{ lib, stdenv, fetchurl, fetchpatch, xorg, ncurses, freetype, fontconfig { lib, stdenv, fetchurl, fetchpatch, xorg, ncurses, freetype, fontconfig
, pkg-config, makeWrapper, nixosTests, writeScript, common-updater-scripts, git , pkg-config, makeWrapper, nixosTests, gitUpdater
, nixfmt, nix, gnused, coreutils, enableDecLocator ? true }: , nixfmt, nix, gnused, coreutils, enableDecLocator ? true }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "xterm"; pname = "xterm";
version = "375"; version = "377";
src = fetchurl { src = fetchurl {
urls = [ urls = [
"ftp://ftp.invisible-island.net/xterm/${pname}-${version}.tgz" "ftp://ftp.invisible-island.net/xterm/${pname}-${version}.tgz"
"https://invisible-mirror.net/archives/xterm/${pname}-${version}.tgz" "https://invisible-mirror.net/archives/xterm/${pname}-${version}.tgz"
]; ];
sha256 = "sha256-MCxZor+B55xqcBUl13gWGiGNEjnyFWjYnivdMcAVIX8="; hash = "sha256-2xCP56Rdjtl+YEchtYRDtHNknmHiY2Mb+HWfhhipkLI=";
}; };
strictDeps = true; strictDeps = true;
@ -81,37 +81,13 @@ stdenv.mkDerivation rec {
standardTest = nixosTests.terminal-emulators.xterm; standardTest = nixosTests.terminal-emulators.xterm;
}; };
updateScript = let updateScript = gitUpdater {
# Tags that end in letters are unstable # No nicer place to find latest release.
suffixes = lib.concatStringsSep " " url = "https://github.com/ThomasDickey/xterm-snapshots.git";
(map (c: "-c versionsort.suffix='${c}'") rev-prefix = "xterm-";
(lib.stringToCharacters "abcdefghijklmnopqrstuvwxyz")); # # Tags that end in letters are unstable
in writeScript "update.sh" '' ignoredVersions = "[a-z]$";
#!${stdenv.shell} };
set -o errexit
PATH=${
lib.makeBinPath [
common-updater-scripts
git
nixfmt
nix
coreutils
gnused
]
}
oldVersion="$(nix-instantiate --eval -E "with import ./. {}; lib.getVersion ${pname}" | tr -d '"')"
latestTag="$(git ${suffixes} ls-remote --exit-code --refs --sort='version:refname' --tags git@github.com:ThomasDickey/xterm-snapshots.git 'xterm-*' | tail --lines=1 | cut --delimiter='/' --fields=3 | sed 's|^xterm-||g')"
if [ ! "$oldVersion" = "$latestTag" ]; then
update-source-version ${pname} "$latestTag" --version-key=version --print-changes
nixpkgs="$(git rev-parse --show-toplevel)"
default_nix="$nixpkgs/pkgs/applications/terminal-emulators/xterm/default.nix"
nixfmt "$default_nix"
else
echo "${pname} is already up-to-date"
fi
'';
}; };
meta = { meta = {