diff options
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/applications/editors/emacs/elisp-packages/manual-packages/lsp-bridge/default.nix | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/pkgs/applications/editors/emacs/elisp-packages/manual-packages/lsp-bridge/default.nix b/pkgs/applications/editors/emacs/elisp-packages/manual-packages/lsp-bridge/default.nix index 2ddd3e0bda3f..7bdd8dcca145 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/manual-packages/lsp-bridge/default.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/manual-packages/lsp-bridge/default.nix @@ -11,8 +11,8 @@ , pyright , ruff , tempel +, writeScript , writeText -, unstableGitUpdater }: let @@ -88,7 +88,22 @@ melpaBuild { runHook postCheck ''; - 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/manateelazycat/lsp-bridge.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.lsp-bridge $version --rev="$commit" + ''; meta = with lib; { description = "A blazingly fast LSP client for Emacs"; |