1 { lib, stdenv, fetchFromGitHub, asciidoctor, gawk, gnused, runtimeShell, binlore, esh }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 sha256 = "1ddaji5nplf1dyvgkrhqjy8m5djaycqcfhjv30yprj1avjymlj6w";
14 nativeBuildInputs = [ asciidoctor ];
16 buildInputs = [ gawk gnused ];
18 makeFlags = [ "prefix=$(out)" "DESTDIR=" ];
22 substituteInPlace esh \
23 --replace '"/bin/sh"' '"${runtimeShell}"' \
24 --replace '"awk"' '"${gawk}/bin/awk"' \
25 --replace 'sed' '${gnused}/bin/sed'
26 substituteInPlace tests/test-dump.exp \
27 --replace '#!/bin/sh' '#!${runtimeShell}'
33 # working around a bug in file. Was fixed in
34 # file 5.41-5.43 but regressed in 5.44+
35 # see https://bugs.astron.com/view.php?id=276
36 # "can" verdict because of `-s SHELL` arg
37 passthru.binlore.out = binlore.synthesize esh ''
42 description = "Simple templating engine based on shell";
44 homepage = "https://github.com/jirutka/esh";
45 license = licenses.mit;
46 maintainers = with maintainers; [ mnacamura ];
47 platforms = platforms.unix;