-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
93 lines (82 loc) · 2.36 KB
/
flake.nix
File metadata and controls
93 lines (82 loc) · 2.36 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
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
82
83
84
85
86
87
88
89
90
91
92
93
{
description = "development workspace";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = {
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = import nixpkgs {
inherit system;
# config.allowUnfree = true;
};
archMap = {
"x86_64" = "amd64";
"aarch64" = "arm64";
};
arch = builtins.getAttr (builtins.elemAt (builtins.split "-" system) 0) archMap;
os = builtins.elemAt (builtins.split "-" system) 2;
in {
devShells.default = pkgs.mkShell {
# hardeningDisable = [ "all" ];
buildInputs = with pkgs; [
(stdenv.mkDerivation rec {
name = "run";
pname = "run";
src = fetchurl {
url = "https://github.com/nxtcoder17/Runfile/releases/download/v1.5.3/run-${os}-${arch}";
sha256 = builtins.getAttr "${os}/${arch}" {
"linux/amd64" = "BRTgIIg1D+Q4nYN4Z5LoHv+NKamT34qOZZDUxpZkBa0=";
"linux/arm64" = "wz0ReA/yvZ1ktMGkLc/vMe/gTDpeI6clL+IBYCUo+Yo=";
"darwin/amd64" = "it/EhW10tZlyEL5reH9FhSFfPSslQr0AgzDcgeqngcI=";
"darwin/arm64" = "aS+b1GoivZmqINb/wBmjXMK4pUWLs17lc2z/FRw/Dx0=";
};
};
unpackPhase = ":";
installPhase = ''
mkdir -p $out/bin
cp $src $out/bin/$name
chmod +x $out/bin/$name
'';
})
# your packages here
bash
# cli tools
jq
yq
# source version control
git
pre-commit
# programming tools
go
ginkgo
kubebuilder
upx
gnumake
];
shellHook = ''
'';
};
packages.helm-job-runner = pkgs.stdenv.mkDerivation {
name = "helm-job-runner";
src = pkgs.buildEnv {
name = "helm-job-runner";
paths = with pkgs; [
bash
kubernetes-helm
curl
kubectl
envsubst
jq
busybox
];
};
installPhase = "cp -r $src $out/";
};
}
);
}