diff options
author | David J. Weller-Fahy <dave@weller-fahy.com> | 2021-03-12 09:51:58 -0500 |
---|---|---|
committer | David J. Weller-Fahy <dave@weller-fahy.com> | 2021-04-04 22:27:40 -0400 |
commit | 0b4245c392eda6eeb0ccd16a9a530059ff84271e (patch) | |
tree | 65a953ce34e805a5b91db61a30ea5ff960db4b7b /pkgs/tools/misc/empty | |
parent | 5156911479d9ba771192ed75150521f2b20b13d2 (diff) |
empty: init at 0.6.21b
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs/tools/misc/empty')
-rw-r--r-- | pkgs/tools/misc/empty/0.6-Makefile.patch | 13 | ||||
-rw-r--r-- | pkgs/tools/misc/empty/default.nix | 46 |
2 files changed, 59 insertions, 0 deletions
diff --git a/pkgs/tools/misc/empty/0.6-Makefile.patch b/pkgs/tools/misc/empty/0.6-Makefile.patch new file mode 100644 index 0000000000000..6fb494cdf54c9 --- /dev/null +++ b/pkgs/tools/misc/empty/0.6-Makefile.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile b/Makefile +index 1fe4c41..2c69558 100644 +--- a/Makefile ++++ b/Makefile +@@ -16,7 +16,7 @@ LIBS = -lutil + PREFIX = /usr/local + + all: +- ${CC} ${CFLAGS} -Wall ${LIBS} -o empty empty.c ++ ${CC} ${CFLAGS} -Wall -o empty empty.c ${LIBS} + + FreeBSD: all + NetBSD: all diff --git a/pkgs/tools/misc/empty/default.nix b/pkgs/tools/misc/empty/default.nix new file mode 100644 index 0000000000000..d8fa41ef02a32 --- /dev/null +++ b/pkgs/tools/misc/empty/default.nix @@ -0,0 +1,46 @@ +{ fetchzip, lib, stdenv, which }: + +stdenv.mkDerivation rec { + pname = "empty"; + version = "0.6.21b"; + + src = fetchzip { + url = "mirror://sourceforge/${pname}/${pname}/${pname}-${version}.tgz"; + sha256 = "1rkixh2byr70pdxrwr4lj1ckh191rjny1m5xbjsa7nqw1fw6c2xs"; + stripRoot = false; + }; + + patches = [ + ./0.6-Makefile.patch + ]; + + nativeBuildInputs = [ which ]; + + makeFlags = [ "PREFIX=$(out)" ]; + + postPatch = '' + rm empty + ''; + + meta = with lib; { + homepage = "http://empty.sourceforge.net"; + description = "A simple tool to automate interactive terminal applications"; + license = licenses.bsd3; + platforms = platforms.all; + longDescription = '' + The empty utility provides an interface to execute and/or interact with + processes under pseudo-terminal sessions (PTYs). This tool is definitely + useful in programming of shell scripts designed to communicate with + interactive programs like telnet, ssh, ftp, etc. In some cases empty can + be the simplest replacement for TCL/expect or other similar programming + tools because empty: + + - can be easily invoked directly from shell prompt or script + - does not use TCL, Perl, PHP, Python or anything else as an underlying language + - is written entirely in C + - has small and simple source code + - can easily be ported to almost all UNIX-like systems + ''; + maintainers = [ maintainers.djwf ]; + }; +} |