forked from alxhlz/hcloud-failover-keepalived
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdefault.nix
39 lines (32 loc) · 856 Bytes
/
default.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
{
lib,
python3,
}:
python3.pkgs.buildPythonApplication rec {
name = "hetzner-robot-failover-keepalived";
pyproject = true;
src = ./.;
build-system = [
python3.pkgs.poetry-core
python3.pkgs.setuptools
python3.pkgs.wheel
];
dependencies = with python3.pkgs; [
bunch
requests
];
postPatch = ''
sed "s|os.path.dirname(__file__)|\"/etc/robot-failover\"|" -i robot_failover.py
'';
installPhase = ''
install -D robot_failover.py "$out/bin/robot_failover"
'';
meta = with lib; {
description = "Hetzner Robot - Failover IP and Private IP switchover with keepalived";
homepage = "https://github.com/mgit-at/hetzner-robot-failover-keepalived";
license = licenses.mit;
maintainers = with maintainers; [ mkg20001 ];
mainProgram = "robot_failover";
platforms = platforms.all;
};
}