diff options
Diffstat (limited to 'pkgs')
-rwxr-xr-x | pkgs/applications/editors/emacs-modes/update-melpa | 8 | ||||
-rw-r--r-- | pkgs/applications/editors/emacs-modes/updater-emacs.nix | 65 |
2 files changed, 41 insertions, 32 deletions
diff --git a/pkgs/applications/editors/emacs-modes/update-melpa b/pkgs/applications/editors/emacs-modes/update-melpa index 2b2af5cb2bbef..5c636416a5e6b 100755 --- a/pkgs/applications/editors/emacs-modes/update-melpa +++ b/pkgs/applications/editors/emacs-modes/update-melpa @@ -1,8 +1,6 @@ #! /usr/bin/env nix-shell -#! nix-shell --show-trace -i sh -p git nix nix-prefetch-git nix-prefetch-hg "import ./updater-emacs.nix" +#! nix-shell --show-trace ./updater-emacs.nix -i bash -# "with import ../../../.. {}; emacsWithPackages (epkgs: with epkgs.melpaPackages; [ promise semaphore ])" +SCRIPT_DIR="$( cd "$(dirname "$0")" ; pwd -P )" -exec emacs --fg-daemon=updater --quick -l update-melpa.el -f run-updater "$@" - -# exec emacs update-melpa.el "$@" +exec emacs --fg-daemon=updater --quick -l $SCRIPT_DIR/update-melpa.el -f run-updater "$@" diff --git a/pkgs/applications/editors/emacs-modes/updater-emacs.nix b/pkgs/applications/editors/emacs-modes/updater-emacs.nix index b64a410e7b40c..c7e858078e6bf 100644 --- a/pkgs/applications/editors/emacs-modes/updater-emacs.nix +++ b/pkgs/applications/editors/emacs-modes/updater-emacs.nix @@ -1,29 +1,40 @@ -with import ../../../.. {}; -(emacsPackagesNgFor emacs26). -emacsWithPackages (epkgs: let - promise = epkgs.trivialBuild { - pname = "promise"; - version = "1"; - src = fetchFromGitHub { - owner = "bendlas"; - repo = "emacs-promise"; - rev = "4da97087c5babbd8429b5ce62a8323b9b03c6022"; - sha256 = "0yin7kj69g4zxs30pvk47cnfygxlaw7jc7chr3b36lz51yqczjsy"; - +let + pkgs = import ../../../.. {}; + + emacsEnv = (pkgs.emacsPackagesNgFor pkgs.emacs26).emacsWithPackages (epkgs: let + + promise = epkgs.trivialBuild { + pname = "promise"; + version = "1"; + src = pkgs.fetchFromGitHub { + owner = "bendlas"; + repo = "emacs-promise"; + rev = "4da97087c5babbd8429b5ce62a8323b9b03c6022"; + sha256 = "0yin7kj69g4zxs30pvk47cnfygxlaw7jc7chr3b36lz51yqczjsy"; + }; }; - }; - semaphore = epkgs.trivialBuild { - pname = "semaphore"; - version = "1"; - packageRequires = [ promise ]; - src = fetchFromGitHub { - owner = "webnf"; - repo = "semaphore.el"; - rev = "93802cb093073bc6a6ccd797328dafffcef248e0"; - sha256 = "09pfyp27m35sv340xarhld7xx2vv5fs5xj4418709iw6l6hpk853"; - + + semaphore = epkgs.trivialBuild { + pname = "semaphore"; + version = "1"; + packageRequires = [ promise ]; + src = pkgs.fetchFromGitHub { + owner = "webnf"; + repo = "semaphore.el"; + rev = "93802cb093073bc6a6ccd797328dafffcef248e0"; + sha256 = "09pfyp27m35sv340xarhld7xx2vv5fs5xj4418709iw6l6hpk853"; + }; }; - }; - in [ promise semaphore ] - # ++ (with epkgs.melpaPackages; [ smex rainbow-delimiters paredit ]) -) + + in [ promise semaphore ]); + +in pkgs.mkShell { + buildInputs = [ + pkgs.git + pkgs.nix + pkgs.bash + pkgs.nix-prefetch-git + pkgs.nix-prefetch-hg + emacsEnv + ]; +} |