forked from redpwn/rcds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
57 lines (51 loc) · 1.59 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
{
description = "rCDS, but actually functional";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in {
devShells.default = with pkgs; mkShellNoCC {
packages = [
colima
docker
self.packages.${system}.rcds
];
# docker-py relies on DOCKER_HOST, which colima doesn't seem to set properly.
# use this one-liner: ```
# $ export DOCKER_HOST=$(docker context inspect $(docker context show) | awk -F '"' '/"Host"/ {print $4}')
# ```
};
packages = {
rcds = with pkgs.python311Packages; buildPythonPackage {
pname = "rcds";
version = "0.1.5";
format = "pyproject";
src = ./.;
nativeBuildInputs = [
pkgs.python311Packages.poetry-core
];
propagatedBuildInputs = with pkgs.python311Packages; [
jinja2
click
docker
jsonschema
kubernetes
pathspec
pyyaml
requests
requests-toolbelt
];
meta = with pkgs.lib; {
description = "redpwn's challenge deployment system";
homepage = "https://github.com/redpwn/rcds";
license = licenses.bsd3;
};
};
};
});
}