ngn-k: unstable-2021-12-17 -> 2022-11-27

This commit is contained in:
sternenseemann 2022-11-28 14:47:38 +01:00
parent f3466a31c7
commit 5822bee639
2 changed files with 17 additions and 13 deletions

View file

@ -13,14 +13,14 @@ in
useStdenv.mkDerivation { useStdenv.mkDerivation {
pname = "ngn-k"; pname = "ngn-k";
version = "unstable-2021-12-17"; version = "unstable-2022-11-27";
src = fetchFromGitea { src = fetchFromGitea {
domain = "codeberg.org"; domain = "codeberg.org";
owner = "ngn"; owner = "ngn";
repo = "k"; repo = "k";
rev = "26f83645e9ed4798b43390fb9dcdfa0ab8245a8f"; rev = "79834b6b9be2a23eec8027d0a2ce11e29f01959c";
sha256 = "sha256-VcJcLcL1C8yQH6xvpKR0R0gMrhSfsU4tW+Yy0rGdSSw="; sha256 = "0dczfyqf33mwxfly39xsgwwgjqqm6pjyrlr6gx04zg8n4ch11zhl";
}; };
patches = [ patches = [
@ -28,10 +28,10 @@ useStdenv.mkDerivation {
]; ];
postPatch = '' postPatch = ''
patchShebangs a19/a.sh a20/a.sh a21/a.sh dy/a.sh e/a.sh patchShebangs --build a19/a.sh a20/a.sh a21/a.sh dy/a.sh e/a.sh
# don't use hardcoded /bin/sh # don't use hardcoded /bin/sh
for f in repl.k m.c;do for f in repl.k repl-bg.k m.c;do
substituteInPlace "$f" --replace "/bin/sh" "${runtimeShell}" substituteInPlace "$f" --replace "/bin/sh" "${runtimeShell}"
done done
''; '';
@ -43,6 +43,7 @@ useStdenv.mkDerivation {
outputs = [ "out" "dev" "lib" ]; outputs = [ "out" "dev" "lib" ];
# TODO(@sternenseemann): package bulgarian translation
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
install -Dm755 k "$out/bin/k" install -Dm755 k "$out/bin/k"

View file

@ -1,10 +1,13 @@
diff --git a/repl.k b/repl.k
index 4c023467..10414162 100755
--- a/repl.k --- a/repl.k
+++ b/repl.k +++ b/repl.k
@@ -1,6 +1,6 @@ @@ -2,7 +2,7 @@
#!k `1:"ngn/k, (c) 2019-2022 ngn, GNU AGPLv3. type \\ for more info\n"
`1:"ngn/k, (c) 2019-2021 ngn, GNU AGPLv3. type \\ for more info\n",repl.prompt:," " \d repl
-repl.cmds:(,"a")!{`1:1:repl.joinpath[repl.dirname`argv 0]"LICENSE";} `1:prompt:," " /use 0x0720 for emacs integration
+repl.cmds:(,"a")!{`1:1:repl.joinpath[repl.dirname`argv 0]"../share/ngn-k/LICENSE";} -cmds:(,"a")!{`1:1:joinpath[dirname`argv 0]"LICENSE";}
repl.dirname:{$[#x:"/"/-1_"/"\x;x;,"."]} +cmds:(,"a")!{`1:1:joinpath[dirname`argv 0]"../share/ngn-k/LICENSE";}
repl.joinpath:{$[x~,".";y;"/"~*|x;x,y;x,"/",y]} dirname:{$[#x:"/"/-1_"/"\x;x;,"."]}
repl.fmt:{$[x~(::);"";(`A~@x)&1<#x;"(",("\n "/`k'x),")\n";`k[x],"\n"]} joinpath:{$[x~,".";y;"/"~*|x;x,y;x,"/",y]}
fmt:{$[x~(::);"";(`A~@x)&1<#x;"(",("\n "/`k'x),")\n";`k[x],"\n"]}