-
Notifications
You must be signed in to change notification settings - Fork 15
/
shell.nix
80 lines (72 loc) · 2.54 KB
/
shell.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
{pkgs}: let
mergeShells = shells:
pkgs.mkShell {
shellHook = builtins.concatStringsSep "\n" (map (s: s.shellHook or "") shells);
buildInputs = builtins.concatLists (map (s: s.buildInputs or []) shells);
nativeBuildInputs = builtins.concatLists (map (s: s.nativeBuildInputs or []) shells);
paths = builtins.concatLists (map (s: s.paths or []) shells);
};
kardinal = pkgs.writeShellScriptBin "kardinal" ''
nix run .#kardinal-cli -- "$@"
'';
go-tidy-all = import ./scripts/go-tidy-all.nix {inherit pkgs;};
manager_shell = pkgs.callPackage ./kardinal-manager/shell.nix {inherit pkgs;};
cli_shell = pkgs.callPackage ./kardinal-cli/shell.nix {inherit pkgs;};
cli_kontrol_api_shell = pkgs.callPackage ./libs/cli-kontrol-api/shell.nix {inherit pkgs;};
demo_shell = pkgs.callPackage ./examples/voting-app/shell.nix {inherit pkgs;};
website_shell = pkgs.callPackage ./website/shell.nix {inherit pkgs;};
kardinal_shell = with pkgs;
pkgs.mkShell {
nativeBuildInputs = [bashInteractive bash-completion];
buildInputs = [
kardinal
go-tidy-all
kubectl
kustomize
kubernetes-helm
minikube
istioctl
tilt
reflex
];
shellHook = ''
export SHELLNAME=$(basename $shell)
source <(kubectl completion $SHELLNAME)
source <(minikube completion $SHELLNAME)
source <(kardinal completion $SHELLNAME)
printf '\u001b[31m
:::::
:::::::
:: :::
::: ::
:: ::- :::
::: :::
::: ::: :::
::: :: ::
::: :: :::
::: ::: ::
::: :: ::
:::: :::: ::
:::: :::: :::
:::::::::::::: ::::
::::::
:::::::::::::::::::::
::::::
:::::
:::
\u001b[0m
Starting Kardinal dev shell.
\e[32m
\e[0m
'
'';
};
in
mergeShells [
manager_shell
cli_shell
kardinal_shell
cli_kontrol_api_shell
demo_shell
website_shell
]