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