build: nix flakes
This commit is contained in:
23
shell.nix
23
shell.nix
@ -1,5 +1,22 @@
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
{ pkgs ? (
|
||||
let
|
||||
inherit (builtins) fetchTree fromJSON readFile;
|
||||
inherit ((fromJSON (readFile ./flake.lock)).nodes) nixpkgs gomod2nix;
|
||||
in
|
||||
import (fetchTree nixpkgs.locked) {
|
||||
overlays = [
|
||||
(import "${fetchTree gomod2nix.locked}/overlay.nix")
|
||||
];
|
||||
}
|
||||
)
|
||||
}:
|
||||
|
||||
with pkgs; mkShell {
|
||||
packages = [ go gcc qemu podman ];
|
||||
let
|
||||
goEnv = pkgs.mkGoEnv { pwd = ./.; };
|
||||
in
|
||||
pkgs.mkShell {
|
||||
packages = [
|
||||
goEnv
|
||||
pkgs.gomod2nix
|
||||
];
|
||||
}
|
||||
|
Reference in New Issue
Block a user