Update shell.nix with dependencies
- Add .envrc, .direnv to gitignore
This commit is contained in:
parent
3704828d45
commit
4c1d5b1111
4 changed files with 27 additions and 19 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,2 +1,4 @@
|
|||
/dist
|
||||
result
|
||||
.direnv/
|
||||
.envrc
|
||||
|
|
|
|||
3
bin/make
Executable file
3
bin/make
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!env bash
|
||||
|
||||
make $*
|
||||
2
envrc.sample
Normal file
2
envrc.sample
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
use flake .
|
||||
gomod2nix
|
||||
15
shell.nix
15
shell.nix
|
|
@ -1,4 +1,5 @@
|
|||
{ pkgs ? (
|
||||
{
|
||||
pkgs ? (
|
||||
let
|
||||
inherit (builtins) fetchTree fromJSON readFile;
|
||||
inherit ((fromJSON (readFile ./flake.lock)).nodes) nixpkgs gomod2nix;
|
||||
|
|
@ -8,17 +9,17 @@
|
|||
(import "${fetchTree gomod2nix.locked}/overlay.nix")
|
||||
];
|
||||
}
|
||||
)
|
||||
, mkGoEnv ? pkgs.mkGoEnv
|
||||
, gomod2nix ? pkgs.gomod2nix
|
||||
}:
|
||||
|
||||
let
|
||||
),
|
||||
mkGoEnv ? pkgs.mkGoEnv,
|
||||
gomod2nix ? pkgs.gomod2nix,
|
||||
}: let
|
||||
goEnv = mkGoEnv {pwd = ./.;};
|
||||
in
|
||||
pkgs.mkShell {
|
||||
packages = [
|
||||
goEnv
|
||||
gomod2nix
|
||||
pkgs.go_1_21
|
||||
pkgs.pre-commit
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue