1 { lib, stdenv, fetchFromGitHub, installShellFiles }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 hash = "sha256-MM4o7d3L3XIRYWJ/KPM2OltlVfVA/BgMuyhJMm/BS3c=";
14 postPatch = lib.optionalString stdenv.cc.isClang ''
15 substituteInPlace Makefile --replace gcc clang
18 nativeBuildInputs = [ installShellFiles ];
20 enableParallelBuilding = true;
22 # instead of mucking around with the Makefile, just install the bits we need
26 install -Dm555 -t $out/bin p910nd
27 install -Dm444 -t $out/share/doc/p910nd *.md
28 installManPage p910nd.?
34 description = "Small printer daemon passing jobs directly to the printer";
36 p910nd is a small printer daemon intended for diskless platforms that
37 does not spool to disk but passes the job directly to the printer.
38 Normally a lpr daemon on a spooling host connects to it with a TCP
39 connection on port 910n (where n=0, 1, or 2 for lp0, 1 and 2
40 respectively). p910nd is particularly useful for diskless platforms.
41 Common Unix Printing System (CUPS) supports this protocol, it's called
42 the AppSocket protocol and has the scheme socket://. LPRng also supports
43 this protocol and the syntax is lp=remotehost%9100 in /etc/printcap.
45 homepage = "https://github.com/kenyapcomau/p910nd";
46 license = licenses.gpl2Only;
47 maintainers = with maintainers; [ peterhoeg ];
48 platforms = platforms.unix;
49 mainProgram = "p910nd";