Commit 82802b47 authored by sternenseemann's avatar sternenseemann
Browse files

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

(cherry picked from commit f9128728da9bed9b35075f5353f065dd12cfb7dd)
parent b87d71a1
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -13,14 +13,14 @@ in

useStdenv.mkDerivation {
  pname = "ngn-k";
  version = "unstable-2021-12-17";
  version = "unstable-2022-11-27";

  src = fetchFromGitea {
    domain = "codeberg.org";
    owner = "ngn";
    repo = "k";
    rev = "26f83645e9ed4798b43390fb9dcdfa0ab8245a8f";
    sha256 = "sha256-VcJcLcL1C8yQH6xvpKR0R0gMrhSfsU4tW+Yy0rGdSSw=";
    rev = "79834b6b9be2a23eec8027d0a2ce11e29f01959c";
    sha256 = "0dczfyqf33mwxfly39xsgwwgjqqm6pjyrlr6gx04zg8n4ch11zhl";
  };

  patches = [
@@ -28,10 +28,10 @@ useStdenv.mkDerivation {
  ];

  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
    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}"
    done
  '';
@@ -43,6 +43,7 @@ useStdenv.mkDerivation {

  outputs = [ "out" "dev" "lib" ];

  # TODO(@sternenseemann): package bulgarian translation
  installPhase = ''
    runHook preInstall
    install -Dm755 k "$out/bin/k"
+11 −8
Original line number Diff line number Diff line
diff --git a/repl.k b/repl.k
index 4c023467..10414162 100755
--- a/repl.k
+++ b/repl.k
@@ -1,6 +1,6 @@
 #!k
 `1:"ngn/k, (c) 2019-2021 ngn, GNU AGPLv3. type \\ for more info\n",repl.prompt:," "
-repl.cmds:(,"a")!{`1:1:repl.joinpath[repl.dirname`argv 0]"LICENSE";}
+repl.cmds:(,"a")!{`1:1:repl.joinpath[repl.dirname`argv 0]"../share/ngn-k/LICENSE";}
 repl.dirname:{$[#x:"/"/-1_"/"\x;x;,"."]}
 repl.joinpath:{$[x~,".";y;"/"~*|x;x,y;x,"/",y]}
 repl.fmt:{$[x~(::);"";(`A~@x)&1<#x;"(",("\n "/`k'x),")\n";`k[x],"\n"]}
@@ -2,7 +2,7 @@
 `1:"ngn/k, (c) 2019-2022 ngn, GNU AGPLv3. type \\ for more info\n"
 \d repl
 `1:prompt:," " /use 0x0720 for emacs integration
-cmds:(,"a")!{`1:1:joinpath[dirname`argv 0]"LICENSE";}
+cmds:(,"a")!{`1:1:joinpath[dirname`argv 0]"../share/ngn-k/LICENSE";}
 dirname:{$[#x:"/"/-1_"/"\x;x;,"."]}
 joinpath:{$[x~,".";y;"/"~*|x;x,y;x,"/",y]}
 fmt:{$[x~(::);"";(`A~@x)&1<#x;"(",("\n "/`k'x),")\n";`k[x],"\n"]}