diff options
Diffstat (limited to 'users/Profpatsch/lib.nix')
-rw-r--r-- | users/Profpatsch/lib.nix | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/users/Profpatsch/lib.nix b/users/Profpatsch/lib.nix index 69e6f73e408a..9215f5b19c77 100644 --- a/users/Profpatsch/lib.nix +++ b/users/Profpatsch/lib.nix @@ -1,6 +1,8 @@ { depot, pkgs, ... }: let - bins = depot.nix.getBins pkgs.coreutils ["printf" "echo"]; + bins = depot.nix.getBins pkgs.coreutils [ "printf" "echo" "cat" "printenv" ] + // depot.nix.getBins pkgs.fdtools [ "multitee" ] + ; debugExec = msg: depot.nix.writeExecline "debug-exec" {} [ "if" [ @@ -15,9 +17,19 @@ let "fdmove" "-c" "1" "2" bins.printf "$@" ]; + eprint-stdin = depot.nix.writeExecline "eprint-stdin" {} [ + "pipeline" [ bins.multitee "0-1,2" ] "$@" + ]; + + eprintenv = depot.nix.writeExecline "eprintenv" { readNArgs = 1; } [ + "fdmove" "-c" "1" "2" bins.printenv "$1" + ]; + in { inherit debugExec eprintf + eprint-stdin + eprintenv ; } |