about summary refs log tree commit diff
path: root/pkgs/shells/es/default.nix
blob: 7b2251a3f44079628d60017667d16cad40ebc10b (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
{ lib, stdenv, fetchurl, readline, yacc }:

let
  version = "0.9.1";
in
stdenv.mkDerivation {

  pname = "es";
  inherit version;

  src = fetchurl {
    url = "https://github.com/wryun/es-shell/releases/download/v${version}/es-${version}.tar.gz";
    sha256 = "1fplzxc6lncz2lv2fyr2ig23rgg5j96rm2bbl1rs28mik771zd5h";
  };

  # The distribution tarball does not have a single top-level directory.
  preUnpack = ''
    mkdir $name
    cd $name
    sourceRoot=.
  '';

  buildInputs = [ readline yacc ];

  configureFlags = [ "--with-readline" ];

  meta = with lib; {
    description = "An extensible shell with higher order functions";
    longDescription =
      ''
        Es is an extensible shell. The language was derived
        from the Plan 9 shell, rc, and was influenced by
        functional programming languages, such as Scheme,
        and the Tcl embeddable programming language.
      '';
    homepage = "http://wryun.github.io/es-shell/";
    license = licenses.publicDomain;
    maintainers = with maintainers; [ sjmackenzie ttuegel ];
    platforms = platforms.all;
  };

  passthru = {
    shellPath = "/bin/es";
  };
}