about summary refs log tree commit diff
path: root/overlays/patches/emacs/overlay/repos/emacs/update
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-06-16 09:13:56 +0000
committerAlyssa Ross <hi@alyssa.is>2023-08-05 09:19:22 +0000
commit7517820d73ff3edcc8da721931aeeaf206929650 (patch)
tree32ddc2dd9ecba9f377b914bb84a719e560a4ee6e /overlays/patches/emacs/overlay/repos/emacs/update
parent99fcaeccb89621dd492203ce1f2d551c06f228ed (diff)
parentf95c33d692cc174df41e40330aec4abf2a94b673 (diff)
downloadnixlib-7517820d73ff3edcc8da721931aeeaf206929650.tar
nixlib-7517820d73ff3edcc8da721931aeeaf206929650.tar.gz
nixlib-7517820d73ff3edcc8da721931aeeaf206929650.tar.bz2
nixlib-7517820d73ff3edcc8da721931aeeaf206929650.tar.lz
nixlib-7517820d73ff3edcc8da721931aeeaf206929650.tar.xz
nixlib-7517820d73ff3edcc8da721931aeeaf206929650.tar.zst
nixlib-7517820d73ff3edcc8da721931aeeaf206929650.zip
Merge https://github.com/nix-community/emacs-overlay
Diffstat (limited to 'overlays/patches/emacs/overlay/repos/emacs/update')
-rwxr-xr-xoverlays/patches/emacs/overlay/repos/emacs/update7
1 files changed, 4 insertions, 3 deletions
diff --git a/overlays/patches/emacs/overlay/repos/emacs/update b/overlays/patches/emacs/overlay/repos/emacs/update
index b5ad47015107..89a5421104ec 100755
--- a/overlays/patches/emacs/overlay/repos/emacs/update
+++ b/overlays/patches/emacs/overlay/repos/emacs/update
@@ -25,6 +25,7 @@ function update_github_repo() {
     owner=$1
     repo=$2
     branch=$3
+    output_name=$4
     echo $repo $branch
 
     # Get relevant data (commit id and timestamp) for the latest commit
@@ -34,9 +35,8 @@ function update_github_repo() {
     commit_sha=$(echo $commit_data | cut -d '/' -f 2)
     version_number=$(echo $commit_data | cut -d '/' -f 3 | cut -d 'T' -f 1 | sed 's/-//g').0
 
-    output_branch=$(echo $branch | sed s/"\/"/"_"/)
     digest=$(nix-prefetch-url --unpack "https://github.com/$owner/$repo/archive/${commit_sha}.tar.gz")
-    echo "{\"type\": \"github\", \"owner\": \"${owner}\", \"repo\": \"${repo}\", \"rev\": \"${commit_sha}\", \"sha256\": \"${digest}\", \"version\": \"${version_number}\"}" > $repo-$output_branch.json
+    echo "{\"type\": \"github\", \"owner\": \"${owner}\", \"repo\": \"${repo}\", \"rev\": \"${commit_sha}\", \"sha256\": \"${digest}\", \"version\": \"${version_number}\"}" > $repo-$output_name.json
 }
 
 function update_release() {
@@ -44,7 +44,7 @@ function update_release() {
 
     tag=$(git ls-remote --tags --refs --sort=-v:refname https://git.savannah.gnu.org/git/emacs.git 'emacs-[1-9]*' | grep -Eo 'emacs-.*' | grep -v '\-rc' | head -n1)
 
-    digest=$(nix-prefetch-url --unpack "https://git.savannah.gnu.org/cgit/emacs.git/snapshot/emacs-${tag}.tar.gz")
+    digest=$(nix-prefetch-url --unpack "https://git.savannah.gnu.org/cgit/emacs.git/snapshot/${tag}.tar.gz")
     version_number=$(echo $tag | cut -d '-' -f 2)
 
     echo "{\"type\": \"savannah\", \"repo\": \"emacs\", \"rev\": \"${tag}\", \"sha256\": \"${digest}\", \"version\": \"${version_number}\"}" > emacs-unstable.json
@@ -52,5 +52,6 @@ function update_release() {
 
 update_savannah_branch master
 update_release
+update_github_repo emacs-lsp emacs json-rpc lsp
 
 nix-build --no-out-link --show-trace ./test.nix