Merge pull request #116067 from djwf/add-empty

This commit is contained in:
Sandro 2021-04-05 05:22:01 +02:00 committed by GitHub
commit 354703e66f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 67 additions and 0 deletions

View File

@ -2413,6 +2413,12 @@
githubId = 10913120;
name = "Dje4321";
};
djwf = {
email = "dave@weller-fahy.com";
github = "djwf";
githubId = 73162;
name = "David J. Weller-Fahy";
};
dkabot = {
email = "dkabot@dkabot.com";
github = "dkabot";

View File

@ -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

View File

@ -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 ];
};
}

View File

@ -4175,6 +4175,8 @@ in
emem = callPackage ../applications/misc/emem { };
empty = callPackage ../tools/misc/empty { };
emulsion = callPackage ../applications/graphics/emulsion {
inherit (darwin.apple_sdk.frameworks) AppKit CoreGraphics CoreServices Foundation OpenGL;
};