mirror of
https://github.com/nix-community/emacs-overlay.git
synced 2025-12-06 02:40:25 -08:00
Add emacs package (updating from github emacs mirror)
This commit is contained in:
parent
bc0f4cef90
commit
168536c0cb
7 changed files with 64 additions and 9 deletions
12
update
12
update
|
|
@ -3,21 +3,23 @@
|
|||
set -euxo pipefail
|
||||
|
||||
function update_repo() {
|
||||
repo=$1
|
||||
owner=$1
|
||||
repo=$2
|
||||
echo $repo
|
||||
|
||||
# Get relevant data (commit id and timestamp) for the latest commit
|
||||
commit_data=$(curl "https://github.com/ch11ng/$repo/commits/master.atom" | xmlstarlet sel -N atom="http://www.w3.org/2005/Atom" -t -m /atom:feed/atom:entry -v "concat(atom:id,'/',atom:updated)" -n | head -n 1)
|
||||
commit_data=$(curl "https://github.com/$owner/$repo/commits/master.atom" | xmlstarlet sel -N atom="http://www.w3.org/2005/Atom" -t -m /atom:feed/atom:entry -v "concat(atom:id,'/',atom:updated)" -n | head -n 1)
|
||||
|
||||
# Extract commit sha and build a version number based on date: YYYYMMDD.0
|
||||
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
|
||||
|
||||
digest=$(nix-prefetch-url --unpack "https://github.com/ch11ng/$repo/archive/${commit_sha}.tar.gz")
|
||||
digest=$(nix-prefetch-url --unpack "https://github.com/$owner/$repo/archive/${commit_sha}.tar.gz")
|
||||
echo "{\"rev\": \"${commit_sha}\", \"sha256\": \"${digest}\", \"version\": \"${version_number}\"}" > repos/$repo.json
|
||||
}
|
||||
|
||||
update_repo exwm
|
||||
update_repo xelb
|
||||
update_repo ch11ng exwm
|
||||
update_repo ch11ng xelb
|
||||
update_repo emacs-mirror emacs
|
||||
|
||||
nix-build --no-out-link --show-trace ./test.nix
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue