2020-12-27 14:24:52 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
|
|
|
, avahi
|
|
|
|
, cups
|
|
|
|
, gnutls
|
|
|
|
, libjpeg
|
|
|
|
, libpng
|
|
|
|
, libusb1
|
|
|
|
, pkg-config
|
|
|
|
, withPAMSupport ? true, pam
|
|
|
|
, zlib
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pappl";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.4.6";
|
2020-12-27 14:24:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "michaelrsweet";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
sha256 = "sha256-d7QD6Kz4tBVHGFPBYcvRSzW+EtsNgpfweFvCx3ovfWE=";
|
2020-12-27 14:24:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
cups
|
|
|
|
libjpeg
|
|
|
|
libpng
|
|
|
|
libusb1
|
|
|
|
zlib
|
|
|
|
] ++ lib.optionals (!stdenv.isDarwin) [
|
|
|
|
# upstream mentions these are not needed for Mac
|
|
|
|
# see: https://github.com/michaelrsweet/pappl#requirements
|
|
|
|
avahi
|
|
|
|
gnutls
|
|
|
|
] ++ lib.optionals withPAMSupport [
|
|
|
|
pam
|
|
|
|
];
|
|
|
|
|
|
|
|
# testing requires some networking
|
|
|
|
# doCheck = true;
|
|
|
|
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
$out/bin/pappl-makeresheader --help
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "C-based framework/library for developing CUPS Printer Applications";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "pappl-makeresheader";
|
2020-12-27 14:24:52 +00:00
|
|
|
homepage = "https://github.com/michaelrsweet/pappl";
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.linux; # should also work for darwin, but requires additional work
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = with maintainers; [ jonringer ];
|
2020-12-27 14:24:52 +00:00
|
|
|
};
|
|
|
|
}
|