nixpkgs/pkgs/applications/printing/pappl/default.nix

65 lines
1.3 KiB
Nix
Raw Normal View History

2020-12-16 08:29:03 +00:00
{ lib, stdenv, fetchFromGitHub
2022-05-12 23:28:46 +00:00
, fetchpatch
2020-12-16 08:29:03 +00:00
, avahi
, cups
, gnutls
, libjpeg
, libpng
, libusb1
, pkg-config
, withPAMSupport ? true, pam
, zlib
}:
stdenv.mkDerivation rec {
pname = "pappl";
2024-03-07 13:55:08 +00:00
version = "1.4.6";
2020-12-16 08:29:03 +00:00
src = fetchFromGitHub {
owner = "michaelrsweet";
repo = pname;
rev = "v${version}";
2024-03-07 13:55:08 +00:00
sha256 = "sha256-d7QD6Kz4tBVHGFPBYcvRSzW+EtsNgpfweFvCx3ovfWE=";
2020-12-16 08:29:03 +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";
mainProgram = "pappl-makeresheader";
2020-12-16 08:29:03 +00:00
homepage = "https://github.com/michaelrsweet/pappl";
license = licenses.asl20;
platforms = platforms.linux; # should also work for darwin, but requires additional work
2024-03-07 13:55:08 +00:00
maintainers = with maintainers; [ jonringer ChlorideCull ];
2020-12-16 08:29:03 +00:00
};
}