nixpkgs/pkgs/by-name/p9/p910nd/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

57 lines
1.7 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
installShellFiles,
}:
stdenv.mkDerivation rec {
pname = "p910nd";
version = "0.97";
src = fetchFromGitHub {
owner = "kenyapcomau";
repo = "p910nd";
rev = version;
hash = "sha256-MM4o7d3L3XIRYWJ/KPM2OltlVfVA/BgMuyhJMm/BS3c=";
};
postPatch = lib.optionalString stdenv.cc.isClang ''
substituteInPlace Makefile --replace gcc clang
'';
nativeBuildInputs = [ installShellFiles ];
enableParallelBuilding = true;
# instead of mucking around with the Makefile, just install the bits we need
installPhase = ''
runHook preInstall
install -Dm555 -t $out/bin p910nd
install -Dm444 -t $out/share/doc/p910nd *.md
installManPage p910nd.?
runHook postInstall
'';
meta = with lib; {
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.
'';
homepage = "https://github.com/kenyapcomau/p910nd";
license = licenses.gpl2Only;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.unix;
mainProgram = "p910nd";
};
}