diff options
Diffstat (limited to 'pkgs/applications/editors/emacs/elisp-packages/manual-packages/acm-terminal/default.nix')
-rw-r--r-- | pkgs/applications/editors/emacs/elisp-packages/manual-packages/acm-terminal/default.nix | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/pkgs/applications/editors/emacs/elisp-packages/manual-packages/acm-terminal/default.nix b/pkgs/applications/editors/emacs/elisp-packages/manual-packages/acm-terminal/default.nix index bac7de0fea356..970174f20c9f4 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/manual-packages/acm-terminal/default.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/manual-packages/acm-terminal/default.nix @@ -4,21 +4,21 @@ , acm , popon , writeText -, unstableGitUpdater +, writeScript }: let - rev = "0dbbd7f401da1bedd1a9146df6127233d601435b"; + rev = "1851d8fa2a27d3fd8deeeb29cd21c3002b8351ba"; in melpaBuild { pname = "acm-terminal"; - version = "20230601.1326"; # 13:26 UTC + version = "20231206.1141"; src = fetchFromGitHub { owner = "twlz0ne"; repo = "acm-terminal"; inherit rev; - sha256 = "sha256-Opouy9A6z0YUT1zxZq1yHx+r/hwNE93JDwfa1fMWNgc="; + sha256 = "sha256-EYhFrOo0j0JSNTdcZCbyM0iLxaymUXi1u6jZy8lTOaY="; }; commit = rev; @@ -32,7 +32,19 @@ melpaBuild { (acm-terminal :repo "twlz0ne/acm-terminal" :fetcher github) ''; - passthru.updateScript = unstableGitUpdater { }; + passthru.updateScript = writeScript "update.sh" '' + #!/usr/bin/env nix-shell + #!nix-shell -i bash -p common-updater-scripts coreutils git gnused + set -eu -o pipefail + tmpdir="$(mktemp -d)" + git clone --depth=1 https://github.com/twlz0ne/acm-terminal.git "$tmpdir" + pushd "$tmpdir" + commit=$(git show -s --pretty='format:%H') + # Based on: https://github.com/melpa/melpa/blob/2d8716906a0c9e18d6c979d8450bf1d15dd785eb/package-build/package-build.el#L523-L533 + version=$(TZ=UTC git show -s --pretty='format:%cd' --date='format-local:%Y%m%d.%H%M' | sed 's|\.0*|.|') + popd + update-source-version emacsPackages.acm-terminal $version --rev="$commit" + ''; meta = with lib; { description = "Patch for LSP bridge acm on Terminal"; |