···11+{ lib
22+, stdenv
33+, fetchurl
44+, readline
55+}:
66+77+stdenv.mkDerivation rec {
88+ pname = "dterm";
99+ version = "0.5";
1010+1111+ src = fetchurl {
1212+ url = "http://www.knossos.net.nz/downloads/dterm-${version}.tgz";
1313+ hash = "sha256-lFM7558e7JZeWYhtXwCjXLZ1xdsdiUGfJTu3LxQKvds=";
1414+ };
1515+1616+ buildInputs = [ readline ];
1717+1818+ postPatch = ''
1919+ substituteInPlace Makefile \
2020+ --replace 'gcc' '${stdenv.cc.targetPrefix}cc'
2121+ '';
2222+2323+ preInstall = "mkdir -p $out/bin";
2424+2525+ installFlags = [ "BIN=$(out)/bin/" ];
2626+2727+ meta = with lib; {
2828+ homepage = "http://www.knossos.net.nz/resources/free-software/dterm/";
2929+ description = "A simple terminal program";
3030+ longDescription = ''
3131+ dterm is a simple terminal emulator, which doesn’t actually emulate any
3232+ particular terminal. Mainly, it is designed for use with xterm and
3333+ friends, which already do a perfectly good emulation, and therefore don’t
3434+ need any special help; dterm simply provides a means by which keystrokes
3535+ are forwarded to the serial line, and data forwarded from the serial line
3636+ appears on the terminal.
3737+ '';
3838+ license = licenses.gpl2Only;
3939+ maintainers = with maintainers; [ auchter ];
4040+ platforms = platforms.unix;
4141+ };
4242+}