mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
tapview: init at 1.1
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
This commit is contained in:
parent
3d1a7716d7
commit
aac9ebc45f
32
pkgs/development/tools/tapview/default.nix
Normal file
32
pkgs/development/tools/tapview/default.nix
Normal file
@ -0,0 +1,32 @@
|
||||
{ asciidoctor
|
||||
, fetchFromGitLab
|
||||
, lib
|
||||
, stdenv
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tapview";
|
||||
version = "1.1";
|
||||
|
||||
nativeBuildInputs = [ asciidoctor ];
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "esr";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-inrxICNglZU/tup+YnHaDiVss32K2OXht/7f8lOZI4g=";
|
||||
};
|
||||
|
||||
# Remove unecessary `echo` checks: `/bin/echo` fails, and `echo -n` works as expected.
|
||||
patches = [ ./dont_check_echo.patch ];
|
||||
|
||||
makeFlags = [ "prefix=$(out)" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A minimalist pure consumer for TAP (Test Anything Protocol)";
|
||||
homepage = "https://gitlab.com/esr/tapview";
|
||||
license = licenses.bsd2;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ pamplemousse ];
|
||||
};
|
||||
}
|
44
pkgs/development/tools/tapview/dont_check_echo.patch
Normal file
44
pkgs/development/tools/tapview/dont_check_echo.patch
Normal file
@ -0,0 +1,44 @@
|
||||
diff --git a/tapview b/tapview
|
||||
index ad6a33a66d1..4cf9545d42f 100644
|
||||
--- a/tapview
|
||||
+++ b/tapview
|
||||
@@ -13,21 +13,6 @@
|
||||
#
|
||||
# This is version 1.1
|
||||
# A newer version may be available at https://gitlab.com/esr/tapview
|
||||
-#
|
||||
-# POSIX allows but does not mandate that -n suppresses emission of a
|
||||
-# trailing newline in echo. Thus, some shell builtin echos don't do
|
||||
-# that. Cope gracefully.
|
||||
-# shellcheck disable=SC2039
|
||||
-if [ "$(echo -n "a"; echo "b")" != "ab" ]
|
||||
-then
|
||||
- ECHO="echo"
|
||||
-elif [ "$(/bin/echo -n "a"; /bin/echo "b")" = "ab" ]
|
||||
-then
|
||||
- ECHO="/bin/echo"
|
||||
-else
|
||||
- echo "tapview: bailing out, your echo lacks -n support."
|
||||
- exit 3
|
||||
-fi
|
||||
|
||||
OK="."
|
||||
FAIL="F"
|
||||
@@ -37,7 +22,7 @@ TODO_OK="u"
|
||||
|
||||
ship_char() {
|
||||
# shellcheck disable=SC2039
|
||||
- "${ECHO}" -n "$1"
|
||||
+ echo -n "$1"
|
||||
}
|
||||
|
||||
ship_line() {
|
||||
@@ -155,7 +140,7 @@ do
|
||||
fi
|
||||
done
|
||||
|
||||
-/bin/echo ""
|
||||
+echo ""
|
||||
|
||||
if [ -z "$expect" ]
|
||||
then
|
@ -411,6 +411,8 @@ in
|
||||
|
||||
pkger = callPackage ../development/libraries/pkger { };
|
||||
|
||||
tapview = callPackage ../development/tools/tapview { };
|
||||
|
||||
run = callPackage ../development/tools/run { };
|
||||
|
||||
mod = callPackage ../development/tools/mod { };
|
||||
|
Loading…
Reference in New Issue
Block a user