about summary refs log tree commit diff
path: root/machines/profpatsch
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2020-12-28 10:46:58 +0100
committerProfpatsch <mail@profpatsch.de>2020-12-28 10:54:42 +0100
commita8f1f449657225795af87e0045ec442ce3c82a26 (patch)
treeed34d0037686a3fcb903dcd227455edf8b99bb62 /machines/profpatsch
parentdad57ac125432a4f699fd258dd5bf2a00e997b55 (diff)
pkgs/profpatsch/e: allow passing a block-style argument as argv
Often times I want to execute “block-style” programs directly, but it
is rather inconvenient to type out `execlineb -c "…"` every time, plus
-c wants the argv as a single string instead of an argv.

The alternative, using the block representation with leading spaces,
is even less ergonomic.

So instead of

execlineb -c "nix-run { -A pkgs.profpatsch.e ~/vuizvui } echo hello"

or even

nix-run ' -A' ' pkgs.profpatsch.e' ' /home/me/vuizvui' '' echo hello

I can now write

e nix-run { -A pkgs.profpatsch.e ~/vuizvui } echo hello

and it will work as expected (provided your shell expands inside {}
blocks, which bash does but fish doesn’t for some reason).

If no argument is passed, e falls back to opening a shell prompt.
Diffstat (limited to 'machines/profpatsch')
-rw-r--r--machines/profpatsch/shiki.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/machines/profpatsch/shiki.nix b/machines/profpatsch/shiki.nix
index e2b563f5..3fc11089 100644
--- a/machines/profpatsch/shiki.nix
+++ b/machines/profpatsch/shiki.nix
@@ -255,6 +255,10 @@ in {
         (texlive.combine { inherit (texlive) scheme-small pdfjam; })
         # move script/nix-cache-binary to here
         cdb
+        (pkgs.vuizvui.profpatsch.binify {
+          exe = pkgs.vuizvui.profpatsch.e;
+          name = "e";
+        })
         myPkgs.zoomboxed
       ];
     in systemPkgs ++ xPkgs ++ guiPkgs