summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/terminal-emulators/xterm
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-11-27 08:51:06 +0000
committerSergei Trofimovich <slyich@gmail.com>2022-11-27 08:51:06 +0000
commit48e8a5c7fcd1ef1edfe1d8a69a05403a62cdd38e (patch)
treedeaadc6268afb9fd83f6313222bdc6deb30ac202 /pkgs/applications/terminal-emulators/xterm
parent9767049d4fecf3fb96d7c8600e765e932e6edbc4 (diff)
xterm: 375 -> 377
While at it simplified the updater. Current one fails to update xterm. Changes: https://invisible-island.net/xterm/xterm.log.html#xterm_377
Diffstat (limited to 'pkgs/applications/terminal-emulators/xterm')
-rw-r--r--pkgs/applications/terminal-emulators/xterm/default.nix44
1 files changed, 10 insertions, 34 deletions
diff --git a/pkgs/applications/terminal-emulators/xterm/default.nix b/pkgs/applications/terminal-emulators/xterm/default.nix
index ff0856734628..581b7384463a 100644
--- a/pkgs/applications/terminal-emulators/xterm/default.nix
+++ b/pkgs/applications/terminal-emulators/xterm/default.nix
@@ -1,17 +1,17 @@
{ 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 }:
stdenv.mkDerivation rec {
pname = "xterm";
- version = "375";
+ version = "377";
src = fetchurl {
urls = [
"ftp://ftp.invisible-island.net/xterm/${pname}-${version}.tgz"
"https://invisible-mirror.net/archives/xterm/${pname}-${version}.tgz"
];
- sha256 = "sha256-MCxZor+B55xqcBUl13gWGiGNEjnyFWjYnivdMcAVIX8=";
+ hash = "sha256-2xCP56Rdjtl+YEchtYRDtHNknmHiY2Mb+HWfhhipkLI=";
};
strictDeps = true;
@@ -81,37 +81,13 @@ stdenv.mkDerivation rec {
standardTest = nixosTests.terminal-emulators.xterm;
};
- updateScript = let
- # Tags that end in letters are unstable
- suffixes = lib.concatStringsSep " "
- (map (c: "-c versionsort.suffix='${c}'")
- (lib.stringToCharacters "abcdefghijklmnopqrstuvwxyz"));
- in writeScript "update.sh" ''
- #!${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
- '';
+ updateScript = gitUpdater {
+ # No nicer place to find latest release.
+ url = "https://github.com/ThomasDickey/xterm-snapshots.git";
+ rev-prefix = "xterm-";
+ # # Tags that end in letters are unstable
+ ignoredVersions = "[a-z]$";
+ };
};
meta = {