gomod2nix/shell.nix
2022-08-23 21:11:28 +08:00

21 lines
432 B
Nix

{ pkgs ? (
let
inherit (builtins) fetchTree fromJSON readFile;
in
import (fetchTree (fromJSON (readFile ./flake.lock)).nodes.nixpkgs.locked) {
overlays = [
(import ./overlay.nix)
];
}
)
}:
pkgs.mkShell {
NIX_PATH = "nixpkgs=${builtins.toString pkgs.path}";
nativeBuildInputs = [
pkgs.nixpkgs-fmt
pkgs.golangci-lint
pkgs.gomod2nix
(pkgs.mkGoEnv { pwd = ./.; })
];
}