tvl-depot/users/Profpatsch/lib.nix
Profpatsch 04f91b5957 feat(users/Profpatsch): add script for randomly evaling nixpkgs
Running this after a codified refactor acts as a good smoke test,
if a big subset of packages is broken or any central packages are
broken, this should find them quite quickly, thanks to randomness™.

Just let it run for a few minutes and check the errors that pop up.

Change-Id: I1505dd31ca25b29254474a15cd6cb71d9743038a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2346
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Reviewed-by: lukegb <lukegb@tvl.fyi>
2021-01-11 08:58:57 +00:00

23 lines
426 B
Nix

{ depot, pkgs, ... }:
let
bins = depot.nix.getBins pkgs.coreutils ["printf" "echo"];
debugExec = msg: depot.nix.writeExecline "debug-exec" {} [
"if" [
"fdmove" "-c" "1" "2"
"if" [ bins.printf "%s: " msg ]
"if" [ bins.echo "$@" ]
]
"$@"
];
eprintf = depot.nix.writeExecline "eprintf" {} [
"fdmove" "-c" "1" "2" bins.printf "$@"
];
in {
inherit
debugExec
eprintf
;
}