-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
63 lines (56 loc) · 1.68 KB
/
flake.nix
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{
description = "Interactive CLI for ECS";
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
gomod2nix.url = "github:nix-community/gomod2nix";
gomod2nix.inputs.nixpkgs.follows = "nixpkgs";
nix-filter.url = "github:numtide/nix-filter";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default";
};
outputs = inputs@{ flake-parts, gomod2nix, nix-filter, nixpkgs, systems, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
flake-parts.flakeModules.easyOverlay
];
systems = import systems;
perSystem = { self', pkgs, system, ... }: {
_module.args.pkgs = import nixpkgs {
inherit system;
overlays = [ gomod2nix.overlays.default ];
};
packages.default = pkgs.buildGoApplication {
pname = "iecs";
version = "0.1.0";
src = nix-filter.lib {
root = ./.;
include = [
"./go.mod"
"./go.sum"
"./main.go"
"cmd"
"selector"
];
};
modules = ./gomod2nix.toml;
};
overlayAttrs = {
iecs = self'.packages.default;
};
};
flake.templates = {
default = {
description = "Shows how to install iecs in flake";
path = ./templates/default;
};
devenv = {
description = "Shows how to install iecs in devenv";
path = ./templates/devenv;
};
overlay = {
description = "Shows how to use iecs as an overlay";
path = ./templates/overlay;
};
};
};
}