···1+{ lib
2+, stdenv
3+, fetchurl
4+, readline
5+}:
6+7+stdenv.mkDerivation rec {
8+ pname = "dterm";
9+ version = "0.5";
10+11+ src = fetchurl {
12+ url = "http://www.knossos.net.nz/downloads/dterm-${version}.tgz";
13+ hash = "sha256-lFM7558e7JZeWYhtXwCjXLZ1xdsdiUGfJTu3LxQKvds=";
14+ };
15+16+ buildInputs = [ readline ];
17+18+ postPatch = ''
19+ substituteInPlace Makefile \
20+ --replace 'gcc' '${stdenv.cc.targetPrefix}cc'
21+ '';
22+23+ preInstall = "mkdir -p $out/bin";
24+25+ installFlags = [ "BIN=$(out)/bin/" ];
26+27+ meta = with lib; {
28+ homepage = "http://www.knossos.net.nz/resources/free-software/dterm/";
29+ description = "A simple terminal program";
30+ longDescription = ''
31+ dterm is a simple terminal emulator, which doesn’t actually emulate any
32+ particular terminal. Mainly, it is designed for use with xterm and
33+ friends, which already do a perfectly good emulation, and therefore don’t
34+ need any special help; dterm simply provides a means by which keystrokes
35+ are forwarded to the serial line, and data forwarded from the serial line
36+ appears on the terminal.
37+ '';
38+ license = licenses.gpl2Only;
39+ maintainers = with maintainers; [ auchter ];
40+ platforms = platforms.unix;
41+ };
42+}