about summary refs log tree commit diff
path: root/utils
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-03-27T10·47+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-03-27T10·59+0000
commit6b224a9e314b6faedd25fc5361a5bb6ac8c3e0a3 (patch)
treeac2eb6daf0d73d4b98a032feac679f5b5840cdd9 /utils
parent47a0b45f5f5620aa683f90186008526b8a4c6d68 (diff)
Drop support for lorri
Lorri does not cleanly integrate with my corporate device, which cannot run
NixOS. To expose dependencies to Emacs buffers, I will use nix-buffer.el, which
reads its values from dir-locals.nix. To easily expose dependencies from my
existing shell.nix files into dir-locals.nix, I wrote a Nix utility function.
Diffstat (limited to 'utils')
-rw-r--r--utils/default.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/utils/default.nix b/utils/default.nix
index df9673daec70..d5130c10ccff 100644
--- a/utils/default.nix
+++ b/utils/default.nix
@@ -11,4 +11,10 @@
   wrapNonNixProgram = { path, as }: pkgs.writeShellScriptBin as ''
     exec ${path} "$@"
   '';
+
+  # Expose the buildInputs from a Nix shell to an Emacs buffer. Intended to be
+  # called from dir-locals.nix files.
+  nixBufferFromShell = path: let
+    shell = import path;
+  in pkgs.nixBufferBuilders.withPackages shell.buildInputs;
 }