nixpkgs/pkgs/by-name/ng/ngn-k/repl-argv-1.patch
sternenseemann abf4d32d74 ngn-k: unstable-2022-11-28 -> unstable-2025-01-04
- Use new unstable version naming convention

- Use --substitute-fail.

- Remove withLibc and doCheck arguments. ngn/k now unconditionally links
  e.g. -lm, so we can't use stdenvNoLibs in any situation.

- Add patch that makes repl.k's check for whether it can read from its
  source work with our name for it.
2025-01-25 13:03:39 +01:00

14 lines
645 B
Diff

diff --git a/repl.k b/repl.k
index dc89832c..33780850 100755
--- a/repl.k
+++ b/repl.k
@@ -28,7 +28,7 @@ joinpath:{$[x~,".";y;"/"~*|x;x,y;x,"/",y]}
line0:{c:{0x07~*-2#*x}{(l;r):x;(1:1;r,,(-2_l))}/(x;());"\n"/(*|c),,*c}
line1:{$[#x;;:0];x:-1_x;$[(3>#x)&("\\"=*x)&~^(!cmds)?x 1;cmds[x 1]x 1;.[`1:(fmt;fmtx)[" "~*x]@.:;,x;{`0:`err[]}]];`1:prompt;1}
line:line1@line0@
-$["repl.k"~basename`argv 1;{cmds::@[cmds;x[1]1;:;{y;`0:x}2_x]}'{(&x~\:80#"-")_x:(1+*&x~\:,"/")_-1_x}@0:`argv 1;];
+$["k-repl"~basename`argv 1;{cmds::@[cmds;x[1]1;:;{y;`0:x}2_x]}'{(&x~\:80#"-")_x:(1+*&x~\:,"/")_-1_x}@0:`argv 1;];
run:{`1:banner,prompt;{line@1:`}::/`;}
\d .