[emacs] add borg-nix-shell and use it to build notmuch's build deps
authorAmin Bandali <amin@gnu.org>
Fri, 24 Aug 2018 18:26:12 +0000 (14:26 -0400)
committerAmin Bandali <amin@gnu.org>
Fri, 24 Aug 2018 18:26:12 +0000 (14:26 -0400)
- currently only works in regular emacs session and not via terminal:
  https://github.com/emacscollective/borg/issues/78

- TODO: add support for guix environment

.gitmodules
init.org
lib/borg-nix-shell [new submodule]

index 6f90e8d..e5a4bb5 100644 (file)
@@ -16,6 +16,9 @@
 [submodule "borg"]
        path = lib/borg
        url = git@github.com:emacscollective/borg.git
 [submodule "borg"]
        path = lib/borg
        url = git@github.com:emacscollective/borg.git
+[submodule "borg-nix-shell"]
+       path = lib/borg-nix-shell
+       url = git@github.com:thblt/borg-nix-shell.git
 [submodule "closql"]
        path = lib/closql
        url = git@github.com:emacscollective/closql.git
 [submodule "closql"]
        path = lib/closql
        url = git@github.com:emacscollective/closql.git
        url = https://git.notmuchmail.org/git/notmuch
        load-path = emacs
        info-path = doc/_build/texinfo
        url = https://git.notmuchmail.org/git/notmuch
        load-path = emacs
        info-path = doc/_build/texinfo
+       build-nix-shell-packages = pkgconfig gitMinimal xapian gmime talloc zlib pythonPackages.sphinx pythonPackages.python texinfo
        build-step = ./configure
        build-step = make
        build-step = make sphinx-texinfo
        build-step = ./configure
        build-step = make
        build-step = make sphinx-texinfo
index e1a6686..51cd9ca 100644 (file)
--- a/init.org
+++ b/init.org
@@ -234,6 +234,9 @@ can then be managed with the help of Magit or other tools.
 (require 'borg)
 (borg-initialize)
 
 (require 'borg)
 (borg-initialize)
 
+(require 'borg-nix-shell)
+(setq borg-build-shell-command 'borg-nix-shell-build-command)
+
 (with-eval-after-load 'bind-key
   (bind-keys
    :package borg
 (with-eval-after-load 'bind-key
   (bind-keys
    :package borg
diff --git a/lib/borg-nix-shell b/lib/borg-nix-shell
new file mode 160000 (submodule)
index 0000000..84dac9e
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 84dac9e821ea445a6b4542d021d3094b0c1e55d3