From 5f4bcd36a276ecbb3a6564520122ec3f3dc180d3 Mon Sep 17 00:00:00 2001 From: happysalada Date: Mon, 21 Sep 2020 10:52:34 +0900 Subject: [PATCH] add instruction for how to install packages with dependencies --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 86c6220..3a3a62e 100644 --- a/README.md +++ b/README.md @@ -46,3 +46,25 @@ instead of running emacs.d/bin/doom, once you have update your config files (pac ## Troubleshooting On macOS on a fresh install, you might run into the error `Too many files open`. running `ulimit -S -n 2048` will only work for the duration of your shell and will fix the error + +## Installing emacs packages + +In the initial packages.el instructions for how to install packages can be found. +However some packages might require a particular software dependency to be installed. +Trying to install those would give you an error of the type: +`Searching for program: No such file or directory, git` (Missing git dependency) +Here is how you would go installing [magit-delta](https://github.com/dandavison/magit-delta) for example (which requires git). + +under the line: +`doomPrivateDir = ./doom.d;` +in your configuration, you would add the following: + +```Nix + emacsPackagesOverlay = self: super: { + magit-delta = super.magit-delta.overrideAttrs (esuper: { + buildInputs = esuper.buildInputs ++ [ pkgs.git ]; + }); + }; +``` +to make the git dependency available. +trying to rebuild doom-emacs with `home-manager switch` should work correctly now.