blob: 69e6f73e408a87fc20e67734d36533940e466a57 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
{ 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
;
}
|