diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2022-09-11 18:01:19 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-11 18:01:19 +0000 |
commit | 6ec60fd2225cf57a06129b9bca02b10d4db4271f (patch) | |
tree | 9e4e5849d806b33bd48b1de782f5a7d7ab417034 /pkgs/applications/editors/emacs/elisp-packages/update-from-overlay | |
parent | 58b4241dc4066d57dcd865699f2a90fa4bea04a2 (diff) | |
parent | ee51699e2d4c51dab524a6d8c639531cc4df64f8 (diff) | |
download | nixlib-6ec60fd2225cf57a06129b9bca02b10d4db4271f.tar nixlib-6ec60fd2225cf57a06129b9bca02b10d4db4271f.tar.gz nixlib-6ec60fd2225cf57a06129b9bca02b10d4db4271f.tar.bz2 nixlib-6ec60fd2225cf57a06129b9bca02b10d4db4271f.tar.lz nixlib-6ec60fd2225cf57a06129b9bca02b10d4db4271f.tar.xz nixlib-6ec60fd2225cf57a06129b9bca02b10d4db4271f.tar.zst nixlib-6ec60fd2225cf57a06129b9bca02b10d4db4271f.zip |
Merge master into staging-next
Diffstat (limited to 'pkgs/applications/editors/emacs/elisp-packages/update-from-overlay')
-rwxr-xr-x | pkgs/applications/editors/emacs/elisp-packages/update-from-overlay | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/pkgs/applications/editors/emacs/elisp-packages/update-from-overlay b/pkgs/applications/editors/emacs/elisp-packages/update-from-overlay index 052364c803c1..80167084c555 100755 --- a/pkgs/applications/editors/emacs/elisp-packages/update-from-overlay +++ b/pkgs/applications/editors/emacs/elisp-packages/update-from-overlay @@ -1,17 +1,37 @@ #!/usr/bin/env nix-shell -#! nix-shell -i bash -p curl nix +#! nix-shell -i bash -p curl nix coreutils set -euxo pipefail -export NIXPKGS_ALLOW_BROKEN=1 - # This script piggybacks on the automatic code generation done by the nix-community emacs overlay # You can use this to avoid running lengthy code generation jobs locally -curl -s -O https://raw.githubusercontent.com/nix-community/emacs-overlay/master/repos/elpa/elpa-generated.nix +export NIXPKGS_ALLOW_BROKEN=1 + +download_change() { + local FILE_LOCATION="$1" + + local BASEURL="https://raw.githubusercontent.com/nix-community/emacs-overlay/master/repos" + + curl -s -O "${BASEURL}/${FILE_LOCATION}" +} + +commit_change() { + local MESSAGE="$1" + local FILENAME="$2" + + git diff --exit-code "${FILENAME}" > /dev/null || \ + git commit -m "${MESSAGE}: updated $(date --iso) (from overlay)" -- "${FILENAME}" +} + +download_change "elpa/elpa-generated.nix" nix-instantiate ../../../../../ -A emacs.pkgs.elpaPackages --show-trace -git diff --exit-code elpa-generated.nix > /dev/null || git commit -m "emacs.pkgs.elpa-packages: $(date --iso)" -- elpa-generated.nix +commit_change "elpa-packages" "elpa-generated.nix" -curl -s -O https://raw.githubusercontent.com/nix-community/emacs-overlay/master/repos/melpa/recipes-archive-melpa.json +download_change "melpa/recipes-archive-melpa.json" nix-instantiate --show-trace ../../../../../ -A emacs.pkgs.melpaStablePackages nix-instantiate --show-trace ../../../../../ -A emacs.pkgs.melpaPackages -git diff --exit-code recipes-archive-melpa.json > /dev/null || git commit -m "emacs.pkgs.melpa-packages: $(date --iso)" -- recipes-archive-melpa.json +commit_change "melpa-packages" "recipes-archive-melpa.json" + +download_change "nongnu/nongnu-generated.nix" +nix-instantiate --show-trace ../../../../../ -A emacs.pkgs.nongnuPackages +commit_change "nongnu-packages" "nongnu-generated.nix" |