2018-12-06 03:27:45 +03:00
|
|
|
{ stdenv, fetchFromGitHub
|
2016-07-31 22:22:26 +03:00
|
|
|
, ncurses }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
2019-08-15 15:41:18 +03:00
|
|
|
pname = "tecoc-git";
|
2016-07-31 22:22:26 +03:00
|
|
|
version = "20150606";
|
|
|
|
|
2018-12-06 03:27:45 +03:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "blakemcbride";
|
|
|
|
repo = "TECOC";
|
2016-07-31 22:22:26 +03:00
|
|
|
rev = "d7dffdeb1dfb812e579d6d3b518545b23e1b50cb";
|
|
|
|
sha256 = "11zfa73dlx71c0hmjz5n3wqcvk6082rpb4sss877nfiayisc0njj";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ ncurses ];
|
|
|
|
|
2018-12-06 03:27:45 +03:00
|
|
|
makefile = if stdenv.hostPlatform.isDarwin
|
|
|
|
then "makefile.osx"
|
|
|
|
else if stdenv.hostPlatform.isFreeBSD
|
|
|
|
then "makefile.bsd"
|
|
|
|
else if stdenv.hostPlatform.isOpenBSD
|
|
|
|
then "makefile.bsd"
|
|
|
|
else if stdenv.hostPlatform.isWindows
|
|
|
|
then "makefile.win"
|
|
|
|
else "makefile.linux"; # I think Linux is a safe default...
|
|
|
|
|
|
|
|
makeFlags = [ "CC=${stdenv.cc}/bin/cc" "-C src/" ];
|
|
|
|
|
2016-07-31 22:22:26 +03:00
|
|
|
installPhase = ''
|
2019-08-15 15:41:18 +03:00
|
|
|
mkdir -p $out/bin $out/share/doc/${pname}-${version} $out/lib/teco/macros
|
2016-07-31 22:22:26 +03:00
|
|
|
cp src/tecoc $out/bin
|
2019-08-15 15:41:18 +03:00
|
|
|
cp src/aaout.txt doc/* $out/share/doc/${pname}-${version}
|
2016-07-31 22:22:26 +03:00
|
|
|
cp lib/* lib2/* $out/lib/teco/macros
|
|
|
|
(cd $out/bin
|
|
|
|
ln -s tecoc Make
|
|
|
|
ln -s tecoc mung
|
|
|
|
ln -s tecoc teco
|
|
|
|
ln -s tecoc Inspect )
|
|
|
|
'';
|
2018-12-06 03:27:45 +03:00
|
|
|
|
2016-07-31 22:22:26 +03:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A clone of the good old TECO editor";
|
|
|
|
longDescription = ''
|
2018-12-06 03:27:45 +03:00
|
|
|
For those who don't know: TECO is the acronym of Tape Editor and COrrector
|
|
|
|
(because it was a paper tape edition tool in its debut days). Now the
|
|
|
|
acronym follows after Text Editor and Corrector, or Text Editor
|
|
|
|
Character-Oriented.
|
|
|
|
|
|
|
|
TECO is a character-oriented text editor, originally developed by Dan
|
|
|
|
Murphy at MIT circa 1962. It is also a Turing-complete imperative
|
|
|
|
interpreted programming language for text manipulation, done via
|
|
|
|
user-loaded sets of macros. In fact, the venerable Emacs was born as a set
|
|
|
|
of Editor MACroS for TECO.
|
2016-07-31 22:22:26 +03:00
|
|
|
|
|
|
|
TECOC is a portable C implementation of TECO-11.
|
|
|
|
'';
|
|
|
|
homepage = https://github.com/blakemcbride/TECOC;
|
2018-12-06 03:27:45 +03:00
|
|
|
license = { url = https://github.com/blakemcbride/TECOC/tree/master/doc/readme-1st.txt; };
|
2016-07-31 22:22:26 +03:00
|
|
|
maintainers = [ maintainers.AndersonTorres ];
|
2018-12-06 03:27:45 +03:00
|
|
|
platforms = platforms.unix;
|
2016-07-31 22:22:26 +03:00
|
|
|
};
|
|
|
|
}
|