about summary refs log tree commit diff
path: root/scratch
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-08-18T11·00+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-08-20T10·26+0100
commit0c71fc9d1d49daa914c0f56f4f9201d40415d9b4 (patch)
tree3c8a4b894065e64111c20d06026b63db17259c65 /scratch
parent51ec9e0d88b15276ec0891f932f6b572d6450809 (diff)
Drop support for dir-locals.nix, <nixpkgs>, etc.
In the spirit of Marie Kondo, I'm tidying up!

TL;DR:
- Prefer .envrc `use_nix` and delete all dir-locals.nix files
- Remove ~all references to <nixpkgs>, <unstable>, <depot> and prefer
  referencing each with briefcase.third_party.{pkgs,unstable,depot}
- Delete nixBufferFromShell function since I was only using that in
  dir-locals.nix files
Diffstat (limited to 'scratch')
-rw-r--r--scratch/deepmind/part_two/.envrc1
-rw-r--r--scratch/deepmind/part_two/dir-locals.nix3
-rw-r--r--scratch/deepmind/part_two/shell.nix3
-rw-r--r--scratch/groceries/.envrc2
-rw-r--r--scratch/groceries/shell.nix9
-rw-r--r--scratch/haskell-programming-from-first-principles/.envrc2
-rw-r--r--scratch/haskell-programming-from-first-principles/shell.nix12
7 files changed, 15 insertions, 17 deletions
diff --git a/scratch/deepmind/part_two/.envrc b/scratch/deepmind/part_two/.envrc
index 1abb058f60d5..a4a62da526d3 100644
--- a/scratch/deepmind/part_two/.envrc
+++ b/scratch/deepmind/part_two/.envrc
@@ -1 +1,2 @@
 source_up
+use_nix
diff --git a/scratch/deepmind/part_two/dir-locals.nix b/scratch/deepmind/part_two/dir-locals.nix
deleted file mode 100644
index 498f4b5055f8..000000000000
--- a/scratch/deepmind/part_two/dir-locals.nix
+++ /dev/null
@@ -1,3 +0,0 @@
-let
-  briefcase = import <briefcase> {};
-in briefcase.utils.nixBufferFromShell ./shell.nix
diff --git a/scratch/deepmind/part_two/shell.nix b/scratch/deepmind/part_two/shell.nix
index 65de884696d0..6080171bb835 100644
--- a/scratch/deepmind/part_two/shell.nix
+++ b/scratch/deepmind/part_two/shell.nix
@@ -1,5 +1,6 @@
 let
-  pkgs = import <nixpkgs> {};
+  briefcase = import <briefcase> {};
+  pkgs = briefcase.third_party.pkgs;
 in pkgs.mkShell {
   buildInputs = with pkgs; [
     nodejs
diff --git a/scratch/groceries/.envrc b/scratch/groceries/.envrc
new file mode 100644
index 000000000000..a4a62da526d3
--- /dev/null
+++ b/scratch/groceries/.envrc
@@ -0,0 +1,2 @@
+source_up
+use_nix
diff --git a/scratch/groceries/shell.nix b/scratch/groceries/shell.nix
index c62b86e12832..4d5b412a0884 100644
--- a/scratch/groceries/shell.nix
+++ b/scratch/groceries/shell.nix
@@ -1,8 +1,5 @@
 let
-  pkgs = import <unstable> {};
-in pkgs.mkShell {
-  buildInputs = with pkgs; [
-    (haskellPackages.ghcWithPackages (hpkgs: with hpkgs; [
-    ]))
-  ];
+  briefcase = import <briefcase> {};
+in briefcase.buildHaskell.shell {
+  deps = hpkgs: [];
 }
diff --git a/scratch/haskell-programming-from-first-principles/.envrc b/scratch/haskell-programming-from-first-principles/.envrc
new file mode 100644
index 000000000000..a4a62da526d3
--- /dev/null
+++ b/scratch/haskell-programming-from-first-principles/.envrc
@@ -0,0 +1,2 @@
+source_up
+use_nix
diff --git a/scratch/haskell-programming-from-first-principles/shell.nix b/scratch/haskell-programming-from-first-principles/shell.nix
index 3190e6e75e72..b594a4207e48 100644
--- a/scratch/haskell-programming-from-first-principles/shell.nix
+++ b/scratch/haskell-programming-from-first-principles/shell.nix
@@ -1,10 +1,8 @@
 let
-  pkgs = import <unstable> {};
-in pkgs.mkShell {
-  buildInputs = with pkgs; [
-    (haskellPackages.ghcWithPackages (hpkgs: with hpkgs; [
-      hpkgs.quickcheck-simple
-      hpkgs.checkers
-    ]))
+  briefcase = import <briefcase> {};
+in briefcase.buildHaskell.shell {
+  deps = hpkgs: with hpkgs; [
+    quickcheck-simple
+    checkers
   ];
 }