diff options
author | tv <tv@krebsco.de> | 2017-06-18 16:12:54 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2017-06-18 16:12:54 +0200 |
commit | faea33e1cb18010ac60f677ac2c18e813e284cc7 (patch) | |
tree | 5ab4189768992e16aa2ed9bc4a509157b544bba6 /krebs/5pkgs/simple/krebszones | |
parent | 9f75e81c5f91aa4236f86c29437de190503ad586 (diff) | |
parent | bf62457ec2655ba4d6ef24c1eb801a80cb7b96bf (diff) |
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'krebs/5pkgs/simple/krebszones')
-rw-r--r-- | krebs/5pkgs/simple/krebszones/default.nix | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/krebs/5pkgs/simple/krebszones/default.nix b/krebs/5pkgs/simple/krebszones/default.nix index 9230192bd..b54c95d88 100644 --- a/krebs/5pkgs/simple/krebszones/default.nix +++ b/krebs/5pkgs/simple/krebszones/default.nix @@ -1,25 +1,13 @@ -{ lib, pkgs,python3Packages,fetchurl, ... }: +{ pkgs, ... }: -# TODO: Prepare a diff of future and current -## ovh-zone export krebsco.de --config ~/secrets/krebs/cfg.json |sed 's/[ ]\+/ /g' | sort current -## sed 's/[ ]\+/ /g'/etc/zones/krebsco.de | sort > future -## diff future.sorted current.sorted - -python3Packages.buildPythonPackage rec { - name = "krebszones-${version}"; - version = "0.4.4"; - propagatedBuildInputs = with pkgs.python3Packages;[ - d2to1 # for setup to work - ovh - docopt - ]; - src = fetchurl { - url = "https://pypi.python.org/packages/source/k/krebszones/krebszones-${version}.tar.gz"; - sha256 = "1bzfc2b9468769j1yj93j12zdlccqbjiqfhql2larximh491sg4d"; - }; - meta = { - homepage = http://krebsco.de/; - description = "OVH Zone Upload"; - license = lib.licenses.wtfpl; - }; -} +pkgs.writeDashBin "krebszones" '' + set -efu + export OVH_ZONE_CONFIG=$HOME/.secrets/krebs/ovh-zone.conf + case $* in + import) + set -- import /etc/zones/krebsco.de krebsco.de + echo "+ krebszones $*" >&2 + ;; + esac + exec ${pkgs.ovh-zone}/bin/ovh-zone "$@" +'' |