refactor(readTree): Move 'drvTargets' into readTree

This function is also generally useful for readTree consumers that
have the concept of subtargets.

Change-Id: Ic7fc03380dec6953fb288763a28e50ab3624d233
This commit is contained in:
Vincent Ambo 2021-11-23 16:31:17 +03:00 committed by tazjin
parent 5cad3f7b81
commit 4f1249e46f
19 changed files with 34 additions and 40 deletions

View file

@ -2,15 +2,11 @@
{ depot, pkgs, ... }:
let
inherit (depot.nix.utils)
drvTargets
;
checkZone = zone: file: pkgs.runCommandNoCC "${zone}-check" {} ''
${pkgs.bind}/bin/named-checkzone -i local ${zone} ${file} | tee $out
'';
in drvTargets {
in depot.nix.readTree.drvTargets {
nixery-dev = checkZone "nixery.dev" ./nixery.dev.zone;
tvl-fyi = checkZone "tvl.fyi" ./tvl.fyi.zone;
tvl-su = checkZone "tvl.su" ./tvl.su.zone;