aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/tools/misc/statserial/default.nix
diff options
context:
space:
mode:
authorKatharina Fey <kookie@spacekookie.de>2020-05-20 01:39:43 +0200
committerKatharina Fey <kookie@spacekookie.de>2020-05-20 01:39:43 +0200
commit1849de11ec1e32e9eebb83f24d5339bea88b7ed7 (patch)
tree0aaf3cead09c2d55c67c6f6a86ad20af399797d8 /nixpkgs/pkgs/tools/misc/statserial/default.nix
parent304c06d7a7ea3f5c84031d325ece8d38b8c1d829 (diff)
parent0f5ce2fac0c726036ca69a5524c59a49e2973dd4 (diff)
Merge commit '0f5ce2fac0c726036ca69a5524c59a49e2973dd4'
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/statserial/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/misc/statserial/default.nix44
1 files changed, 44 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/misc/statserial/default.nix b/nixpkgs/pkgs/tools/misc/statserial/default.nix
new file mode 100644
index 00000000000..66ae899b9c5
--- /dev/null
+++ b/nixpkgs/pkgs/tools/misc/statserial/default.nix
@@ -0,0 +1,44 @@
+{ stdenv, fetchurl, ncurses, glibc }:
+
+stdenv.mkDerivation rec {
+ pname = "statserial";
+ version = "1.1";
+
+ src = fetchurl {
+ url = "http://www.ibiblio.org/pub/Linux/system/serial/${pname}-${version}.tar.gz";
+ sha256 = "0rrrmxfba5yn836zlgmr8g9xnrpash7cjs7lk2m44ac50vakpks0";
+ };
+
+ postPatch = ''
+ substituteInPlace Makefile \
+ --replace '-lcurses' '-lncurses'
+
+ substituteInPlace Makefile \
+ --replace 'LDFLAGS = -s -N' '#LDFLAGS = -s -N'
+ '';
+
+ buildInputs = [ ncurses glibc stdenv ];
+
+ installPhase = ''
+ mkdir -p $out/bin
+ cp statserial $out/bin
+
+ mkdir -p $out/share/man/man1
+ cp statserial.1 $out/share/man/man1
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = "https://sites.google.com/site/tranter/software";
+ description = "Display serial port modem status lines.";
+ license = licenses.gpl2;
+
+ longDescription =
+ '' Statserial displays a table of the signals on a standard 9-pin or
+ 25-pin serial port, and indicates the status of the handshaking lines. It
+ can be useful for debugging problems with serial ports or modems.
+ '';
+
+ platforms = platforms.unix;
+ maintainers = with maintainers; [ rps ];
+ };
+}