Merge pull request #170015 from adisbladis/emacs-manual-packages-updater

emacs: Add update script for manually packaged packages
This commit is contained in:
adisbladis 2022-04-24 09:28:05 +07:00 committed by GitHub
commit 357a8492ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$( cd "$(dirname "$0")" ; pwd -P )"
cd "$SCRIPT_DIR"
./update-from-overlay
./update-manual
git commit -m "emacs.pkgs.manualPackages: $(date --iso)" -- .

View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$( cd "$(dirname "$0")" ; pwd -P )"
cd "$SCRIPT_DIR"
nix-build --no-out-link update-manual.nix | xargs -n 1 -P $(nproc) bash -c

View File

@ -0,0 +1,11 @@
let
pkgs = import ../../../../../. {
config.allowBroken = true;
};
inherit (pkgs) lib emacs;
inherit (lib) isDerivation hasAttr filterAttrs mapAttrs attrValues;
# Extract updateScript's from manually package emacs packages
hasScript = filterAttrs (_: v: isDerivation v && hasAttr "updateScript" v) emacs.pkgs.manualPackages;
in attrValues (mapAttrs (_: v: v.updateScript) hasScript)