From 15abfa1bf197dc23943e637f26d13bb06bb9db56 Mon Sep 17 00:00:00 2001 From: Quentin Aristote Date: Sun, 26 Feb 2023 12:04:18 +0100 Subject: fix spacemacs update script to integrate local branch --- home/config/emacs.nix | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'home/config') diff --git a/home/config/emacs.nix b/home/config/emacs.nix index 4bb1143..50fd213 100644 --- a/home/config/emacs.nix +++ b/home/config/emacs.nix @@ -2,10 +2,20 @@ let cfg = config.programs.emacs; - spacemacs-update-script = pkgs.writeShellScript "spacemacs-update" '' - ${pkgs.git}/bin/git pull - ${cfg.package}/bin/emacsclient --eval '(configuration-layer/update-packages "no-confirmation")' - ''; + spacemacs-update-script = pkgs.callPackage ({ emacs, git }: + pkgs.writeShellApplication { + name = "spacemacs-update"; + + runtimeInputs = [ emacs git ]; + + text = '' + git checkout develop + git pull + git checkout local + git merge develop + emacsclient --eval '(configuration-layer/update-packages "no-confirmation")' + ''; + }) { emacs = cfg.package; }; in { programs.emacs = { enable = true; @@ -36,8 +46,6 @@ in { Persistent = true; OnCalendar = "daily"; }; - Install = { - WantedBy = [ "default.target" ]; - }; + Install = { WantedBy = [ "default.target" ]; }; }); } -- cgit v1.2.3