about summary refs log tree commit diff
path: root/utils/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'utils/default.nix')
-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;
 }