1{ lib
2, stdenv
3, fetchurl
4, installShellFiles
5}:
6
7stdenv.mkDerivation rec {
8 pname = "mksh";
9 version = "59c";
10
11 src = fetchurl {
12 urls = [
13 "http://www.mirbsd.org/MirOS/dist/mir/mksh/${pname}-R${version}.tgz"
14 "http://pub.allbsd.org/MirOS/dist/mir/mksh/${pname}-R${version}.tgz"
15 ];
16 hash = "sha256-d64WZaM38cSMYda5Yds+UhGbOOWIhNHIloSvMfh7xQY=";
17 };
18
19 strictDeps = true;
20 nativeBuildInputs = [
21 installShellFiles
22 ];
23
24 dontConfigure = true;
25
26 buildPhase = ''
27 runHook preBuild
28 sh ./Build.sh -r
29 runHook postBuild
30 '';
31
32 installPhase = ''
33 runHook preInstall
34 install -D mksh $out/bin/mksh
35 install -D dot.mkshrc $out/share/mksh/mkshrc
36 installManPage mksh.1
37 runHook postInstall
38 '';
39
40 meta = with lib; {
41 homepage = "http://www.mirbsd.org/mksh.htm";
42 description = "MirBSD Korn Shell";
43 longDescription = ''
44 The MirBSD Korn Shell is a DFSG-free and OSD-compliant (and OSI
45 approved) successor to pdksh, developed as part of the MirOS
46 Project as native Bourne/POSIX/Korn shell for MirOS BSD, but
47 also to be readily available under other UNIX(R)-like operating
48 systems.
49 '';
50 license = with licenses; [ miros isc unicode-dfs-2016 ];
51 maintainers = with maintainers; [ AndersonTorres joachifm ];
52 platforms = platforms.unix;
53 };
54
55 passthru = {
56 shellPath = "/bin/mksh";
57 };
58}
59# TODO [ AndersonTorres ]: lksh
60# TODO [ AndersonTorres ]: a more accurate licensing info