Prefer direnv's use_nix to shell.nix
I find it bothersome to share the list of Haskell dependencies between my default.nix and shell.nix files. A few days ago, I created a THIRD file, shared.nix, that defined the shared code b/w default.nix and shell.nix. This DRY'd things up, but it also added a new file, which I didn't like. Today I learned that direnv integrates with Nix using a function called `use_nix`. Voila! I typically already have .envrc files per-project, so this doesn't add any unnecessary files, and it allows me to delete my shell.nix files. I would use `lorri`, except that I encountered issues using Lorri on my work computer, which I'm not interested in attempting to resolve now.
This commit is contained in:
parent
b984a2d1e0
commit
56b503c573
2 changed files with 1 additions and 10 deletions
1
zoo/.envrc
Normal file
1
zoo/.envrc
Normal file
|
@ -0,0 +1 @@
|
|||
use_nix
|
|
@ -1,10 +0,0 @@
|
|||
let
|
||||
briefcase = import /home/wpcarro/briefcase {};
|
||||
in briefcase.buildHaskell.shell {
|
||||
deps = hpkgs: with hpkgs; [
|
||||
hspec
|
||||
rio
|
||||
string-conversions
|
||||
servant-server
|
||||
];
|
||||
}
|
Loading…
Reference in a new issue