1
0

build: nix flakes

This commit is contained in:
2023-05-16 11:47:17 +00:00
parent 4d950d7302
commit 5ecacf00bd
7 changed files with 331 additions and 10 deletions

View File

@ -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
];
}