about summary refs log tree commit diff
path: root/go
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 /go
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 'go')
-rw-r--r--go/.envrc2
-rw-r--r--go/dir-locals.nix3
-rw-r--r--go/shell.nix6
3 files changed, 7 insertions, 4 deletions
diff --git a/go/.envrc b/go/.envrc
index be81feddb1a5..1abb058f60d5 100644
--- a/go/.envrc
+++ b/go/.envrc
@@ -1 +1 @@
-eval "$(lorri direnv)"
\ No newline at end of file
+source_up
diff --git a/go/dir-locals.nix b/go/dir-locals.nix
new file mode 100644
index 000000000000..498f4b5055f8
--- /dev/null
+++ b/go/dir-locals.nix
@@ -0,0 +1,3 @@
+let
+  briefcase = import <briefcase> {};
+in briefcase.utils.nixBufferFromShell ./shell.nix
diff --git a/go/shell.nix b/go/shell.nix
index e98da7d0f84a..aab4123bff9a 100644
--- a/go/shell.nix
+++ b/go/shell.nix
@@ -1,6 +1,6 @@
-{ pkgs, ... }:
-
-pkgs.mkShell {
+let
+  pkgs = import <nixpkgs> {};
+in pkgs.mkShell {
   buildInputs = [
     pkgs.go
     pkgs.goimports