about summary refs log tree commit diff
path: root/pkgs/shells/ksh/default.nix
blob: ae9dba16aedff20885b9ea9b5603f12df6d08bdf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
  lib,
  stdenv,
  meson,
  ninja,
  fetchFromGitHub,
  which,
  python3,
  fetchpatch,
  libiconv,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "ksh";
  version = "2020.0.0";

  src = fetchFromGitHub {
    owner = "att";
    repo = "ast";
    rev = finalAttrs.version;
    sha256 = "0cdxz0nhpq03gb9rd76fn0x1yzs2c8q289b7vcxnzlsrz1imz65j";
  };

  patches = [
    (fetchpatch {
      url = "https://github.com/att/ast/commit/11983a71f5e29df578b7e2184400728b4e3f451d.patch";
      sha256 = "1n9558c4v2qpgpjb1vafs29n3qn3z0770wr1ayc0xjf5z5j4g3kv";
    })
  ];

  nativeBuildInputs = [
    meson
    ninja
    which
    python3
  ];

  buildInputs = [ libiconv ];

  strictDeps = true;

  meta = {
    description = "KornShell Command And Programming Language";
    longDescription = ''
      The KornShell language was designed and developed by David G. Korn at
      AT&T Bell Laboratories. It is an interactive command language that
      provides access to the UNIX system and to many other systems, on the
      many different computers and workstations on which it is implemented.
    '';
    homepage = "https://github.com/att/ast";
    license = lib.licenses.cpl10;
    maintainers = with lib.maintainers; [ sigmanificient ];
    platforms = lib.platforms.all;
  };

  passthru = {
    shellPath = "/bin/ksh";
  };
})