about summary refs log tree commit diff
path: root/pkgs/by-name
diff options
context:
space:
mode:
authorAnderson Torres <torres.anderson.85@protonmail.com>2023-09-10 14:45:28 -0300
committerAnderson Torres <torres.anderson.85@protonmail.com>2023-09-19 00:02:22 -0300
commitfd09de7be5279da58b5f6b417cc9f40def8d4b7d (patch)
tree7c904cd4eebe2aaabe8b3acc9e35733e8e299b4e /pkgs/by-name
parent78cccac71c66d3a8115a8ce61ca016d7dc4ecabf (diff)
mksh: migrate to by-name
Diffstat (limited to 'pkgs/by-name')
-rw-r--r--pkgs/by-name/mk/mksh/package.nix61
1 files changed, 61 insertions, 0 deletions
diff --git a/pkgs/by-name/mk/mksh/package.nix b/pkgs/by-name/mk/mksh/package.nix
new file mode 100644
index 0000000000000..27cee1d4e2266
--- /dev/null
+++ b/pkgs/by-name/mk/mksh/package.nix
@@ -0,0 +1,61 @@
+{ lib
+, stdenv
+, fetchurl
+, installShellFiles
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "mksh";
+  version = "59c";
+
+  src = fetchurl {
+    urls = [
+      "http://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R${finalAttrs.version}.tgz"
+      "http://pub.allbsd.org/MirOS/dist/mir/mksh/mksh-R${finalAttrs.version}.tgz"
+    ];
+    hash = "sha256-d64WZaM38cSMYda5Yds+UhGbOOWIhNHIloSvMfh7xQY=";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    installShellFiles
+  ];
+
+  dontConfigure = true;
+
+  buildPhase = ''
+    runHook preBuild
+    sh ./Build.sh -r
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    install -D mksh $out/bin/mksh
+    install -D dot.mkshrc $out/share/mksh/mkshrc
+    installManPage mksh.1
+    runHook postInstall
+  '';
+
+  passthru = {
+    shellPath = "/bin/mksh";
+  };
+
+  meta = {
+    homepage = "http://www.mirbsd.org/mksh.htm";
+    description = "MirBSD Korn Shell";
+    longDescription = ''
+      The MirBSD Korn Shell is a DFSG-free and OSD-compliant (and OSI
+      approved) successor to pdksh, developed as part of the MirOS
+      Project as native Bourne/POSIX/Korn shell for MirOS BSD, but
+      also to be readily available under other UNIX(R)-like operating
+      systems.
+    '';
+    license = with lib.licenses; [ miros isc unicode-dfs-2016 ];
+    maintainers = with lib.maintainers; [ AndersonTorres joachifm ];
+    platforms = lib.platforms.unix;
+  };
+})
+# TODO [ AndersonTorres ]: lksh
+# TODO [ AndersonTorres ]: a more accurate licensing info