tvl-depot/users/Profpatsch/execline/default.nix
Profpatsch 83634341aa feat(users/Profpatsch/execline): add args_for_exec
`exec_into_args` would just read argv and exec into it, but we want to
be able to write commands which take some positional arguments first.

Thus we split the invocation into `args_for_exec`, which returns the
positional arguments and prog, and then pass prog to `exec_into_args`
when we want to exec eventually (prog is still an iterator at this
point).

Change-Id: I0b180c1a100b96363fe33ba2c42034ed41716b7a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2474
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-01-31 16:06:25 +00:00

12 lines
207 B
Nix

{ depot, pkgs, lib, ... }:
let
exec-helpers = depot.users.Profpatsch.writers.rustSimpleLib {
name = "exec-helpers";
} (builtins.readFile ./exec_helpers.rs);
in {
inherit
exec-helpers
;
}