Files
nixpkgs/pkgs/by-name/st/statserial/package.nix
Lisanna Dettwyler bcad67fe25 statserial: use https for sources
Signed-off-by: Lisanna Dettwyler <lisanna.dettwyler@gmail.com>
2026-03-21 12:31:05 -04:00

55 lines
1.2 KiB
Nix

{
lib,
stdenv,
fetchurl,
ncurses,
glibc,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "statserial";
version = "1.1";
src = fetchurl {
url = "https://www.ibiblio.org/pub/Linux/system/serial/statserial-${finalAttrs.version}.tar.gz";
sha256 = "0rrrmxfba5yn836zlgmr8g9xnrpash7cjs7lk2m44ac50vakpks0";
};
postPatch = ''
substituteInPlace Makefile \
--replace '-lcurses' '-lncurses'
substituteInPlace Makefile \
--replace 'LDFLAGS = -s -N' '#LDFLAGS = -s -N'
'';
buildInputs = [
ncurses
glibc
];
installPhase = ''
mkdir -p $out/bin
cp statserial $out/bin
mkdir -p $out/share/man/man1
cp statserial.1 $out/share/man/man1
'';
meta = {
homepage = "https://sites.google.com/site/tranter/software";
description = "Display serial port modem status lines";
license = lib.licenses.gpl2Plus;
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 = lib.platforms.unix;
maintainers = with lib.maintainers; [ rps ];
mainProgram = "statserial";
};
})