From ee62cda9a5887cc15e32e184d10265a705aae2e0 Mon Sep 17 00:00:00 2001 From: zseri Date: Mon, 27 Dec 2021 02:25:27 +0100 Subject: refactor(web/todolist): omit unnecessary intermediate drv also import yants functions explicitly Change-Id: Idd16d130a95efc30216cb54051c7193a42978003 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4689 Tested-by: BuildkiteCI Reviewed-by: zseri Reviewed-by: lukegb Autosubmit: zseri --- web/todolist/default.nix | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'web/todolist') diff --git a/web/todolist/default.nix b/web/todolist/default.nix index 938902f315..a2fcb501bd 100644 --- a/web/todolist/default.nix +++ b/web/todolist/default.nix @@ -4,14 +4,12 @@ # only for users that are known to us. { depot, lib, pkgs, ... }: -with depot.nix.yants; - let inherit (pkgs) jq ripgrep runCommandNoCC - writeText + writeTextFile ; inherit (builtins) @@ -25,6 +23,13 @@ let inherit (lib) concatStringsSep; + inherit (depot.nix.yants) + defun + int + string + struct + ; + knownUsers = map (u: u.username) depot.ops.users; todo = struct { @@ -68,7 +73,10 @@ let staticUrl = "https://static.tvl.fyi/${depot.web.static.drvHash}"; - todoPage = writeText "index.html" '' +in writeTextFile { + name = "tvl-todos"; + destination = "/index.html"; + text = '' @@ -104,8 +112,4 @@ let ''; - -in runCommandNoCC "tvl-todos" {} '' - mkdir $out - cp ${todoPage} $out/index.html -'' +} -- cgit 1.4.1