-
Notifications
You must be signed in to change notification settings - Fork 72
Expand file tree
/
Copy pathflake.nix
More file actions
49 lines (47 loc) · 1.28 KB
/
flake.nix
File metadata and controls
49 lines (47 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
description = "nix2container: build container image with Nix";
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
outputs = { self, nixpkgs }:
let
defaultSystems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
perSystem = nixpkgs.lib.genAttrs defaultSystems;
in {
packages = perSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
nix2container = import ./. {
inherit pkgs;
};
examples = import ./examples {
inherit pkgs;
inherit (nix2container) nix2container;
};
tests = import ./tests {
inherit pkgs examples;
inherit (nix2container) nix2container;
};
in {
inherit (nix2container) nix2container-bin skopeo-nix2container nix2container;
inherit examples tests;
default = nix2container.nix2container-bin;
}
);
devShells = perSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in {
default = pkgs.mkShell {
buildInputs = [
pkgs.go pkgs.godef pkgs.gopls
pkgs.golangci-lint
];
};
}
);
};
}