system/nixos/hosts/tatos/services/update_ru_routes.nix

24 lines
481 B
Nix
Raw Normal View History

2023-07-28 17:08:13 +03:00
{ writeShellScriptBin
, symlinkJoin
, makeWrapper
, bind
, iptables
, ipcalc
, jq
, gawk
, curl
}:
let
update_ru_routes_unwrapped = writeShellScriptBin "update_ru_routes" (builtins.readFile ./update_ru_routes.sh);
in
symlinkJoin {
name = "update_ru_routes";
paths = [ update_ru_routes_unwrapped ] ++ [ bind.dnsutils iptables jq gawk curl ipcalc ];
buildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/update_ru_routes --prefix PATH : $out/bin
'';
}