-
Notifications
You must be signed in to change notification settings - Fork 10
/
flake.nix
81 lines (76 loc) · 2.56 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
{
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
devshell = {
url = "github:numtide/devshell";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
inputs@{ self
, devshell
, flake-parts
, nixpkgs
}: flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "aarch64-darwin" "x86_64-linux" "aarch64-linux" ];
imports = [
devshell.flakeModule
];
perSystem = { self', system, ... }:
let
lib = pkgs.lib;
pkgs = import nixpkgs {
inherit system;
overlays = [
# Load in various overrides for custom packages and version pinning.
(import ./ci/overlay.nix { pkgs = pkgs; })
];
};
in
{
formatter = pkgs.nixpkgs-fmt;
devshells.default = {
env = [
{ name = "GOPRIVATE"; value = "github.com/redpanda-data/flux-controller-shim"; }
{ name = "KUBEBUILDER_ASSETS"; eval = "$(setup-envtest use -p path 1.29.x)"; }
];
# If the version of the installed binary is important make sure to
# update TestToolVersions.
packages = [
pkgs.applyconfiguration-gen
pkgs.controller-gen
pkgs.chart-testing
pkgs.diffutils # Provides `diff`, used by golangci-lint.
pkgs.docker-client
pkgs.docker-tag-list
pkgs.gawk # GNU awk, used by some build scripts.
pkgs.gnused # Stream Editor, used by some build scripts.
pkgs.go-task
pkgs.go-tools
pkgs.go_1_23
pkgs.gofumpt
pkgs.golangci-lint
pkgs.goreleaser
pkgs.k3d # Kind alternative that allows adding/removing Nodes.
pkgs.kind
pkgs.kubectl
pkgs.kubernetes-helm
pkgs.kustomize
pkgs.kuttl
pkgs.openssl
pkgs.helm-docs
pkgs.helm-3-10-3
pkgs.go-junit-report
pkgs.setup-envtest # Kubernetes provided test utilities
pkgs.yq-go
pkgs.buildkite-agent
# pkgs.actionlint # Github Workflow definition linter https://github.com/rhysd/actionlint
# pkgs.gotools
] ++ lib.optionals pkgs.stdenv.isLinux [
pkgs.sysctl # Used to adjust ulimits on linux systems (Namely, CI).
];
};
};
};
}