2022-08-12 12:06:08 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, installShellFiles }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "p910nd";
|
|
|
|
version = "0.97";
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kenyapcomau";
|
|
|
|
repo = "p910nd";
|
|
|
|
rev = version;
|
|
|
|
hash = "sha256-MM4o7d3L3XIRYWJ/KPM2OltlVfVA/BgMuyhJMm/BS3c=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
postPatch = lib.optionalString stdenv.cc.isClang ''
|
|
|
|
substituteInPlace Makefile --replace gcc clang
|
|
|
|
'';
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
# instead of mucking around with the Makefile, just install the bits we need
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
install -Dm555 -t $out/bin p910nd
|
|
|
|
install -Dm444 -t $out/share/doc/p910nd *.md
|
|
|
|
installManPage p910nd.?
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Small printer daemon passing jobs directly to the printer";
|
|
|
|
longDescription = ''
|
|
|
|
p910nd is a small printer daemon intended for diskless platforms that
|
|
|
|
does not spool to disk but passes the job directly to the printer.
|
|
|
|
Normally a lpr daemon on a spooling host connects to it with a TCP
|
|
|
|
connection on port 910n (where n=0, 1, or 2 for lp0, 1 and 2
|
|
|
|
respectively). p910nd is particularly useful for diskless platforms.
|
|
|
|
Common Unix Printing System (CUPS) supports this protocol, it's called
|
|
|
|
the AppSocket protocol and has the scheme socket://. LPRng also supports
|
|
|
|
this protocol and the syntax is lp=remotehost%9100 in /etc/printcap.
|
|
|
|
'';
|
2022-08-12 12:06:08 +00:00
|
|
|
homepage = "https://github.com/kenyapcomau/p910nd";
|
|
|
|
license = licenses.gpl2Only;
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
2021-03-19 17:17:44 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|