2024-10-15 22:46:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
avahi,
|
|
|
|
cups,
|
|
|
|
gnutls,
|
|
|
|
libjpeg,
|
|
|
|
libpng,
|
|
|
|
libusb1,
|
|
|
|
pkg-config,
|
|
|
|
withPAMSupport ? true,
|
|
|
|
pam,
|
|
|
|
zlib,
|
2020-12-16 08:29:03 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pappl";
|
2024-10-15 22:39:31 +00:00
|
|
|
version = "1.4.7";
|
2020-12-16 08:29:03 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "michaelrsweet";
|
2024-10-15 22:45:07 +00:00
|
|
|
repo = "pappl";
|
2024-10-15 22:47:51 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-10-15 22:45:07 +00:00
|
|
|
hash = "sha256-Npry3H+QbAH19hoqAZuOwjpZwCPhOLewD8uKZlo4gdQ=";
|
2020-12-16 08:29:03 +00:00
|
|
|
};
|
|
|
|
|
2024-10-15 22:46:15 +00:00
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"dev"
|
|
|
|
];
|
2020-12-16 08:29:03 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
2024-10-15 22:46:15 +00:00
|
|
|
buildInputs =
|
|
|
|
[
|
|
|
|
cups
|
|
|
|
libjpeg
|
|
|
|
libpng
|
|
|
|
libusb1
|
|
|
|
zlib
|
|
|
|
]
|
|
|
|
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
|
|
|
|
# upstream mentions these are not needed for Mac
|
|
|
|
# see: https://github.com/michaelrsweet/pappl#requirements
|
|
|
|
avahi
|
|
|
|
gnutls
|
|
|
|
]
|
|
|
|
++ lib.optionals withPAMSupport [
|
|
|
|
pam
|
|
|
|
];
|
2020-12-16 08:29:03 +00:00
|
|
|
|
|
|
|
# testing requires some networking
|
|
|
|
# doCheck = true;
|
|
|
|
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
$out/bin/pappl-makeresheader --help
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2024-10-15 22:45:07 +00:00
|
|
|
meta = {
|
2020-12-16 08:29:03 +00:00
|
|
|
description = "C-based framework/library for developing CUPS Printer Applications";
|
2024-10-15 22:45:07 +00:00
|
|
|
changelog = "https://github.com/michaelrsweet/pappl/blob/v${version}/CHANGES.md";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "pappl-makeresheader";
|
2020-12-16 08:29:03 +00:00
|
|
|
homepage = "https://github.com/michaelrsweet/pappl";
|
2024-10-15 22:45:07 +00:00
|
|
|
license = lib.licenses.asl20;
|
|
|
|
platforms = lib.platforms.linux; # should also work for darwin, but requires additional work
|
2024-10-15 22:46:15 +00:00
|
|
|
maintainers = [ lib.maintainers.NotAShelf ];
|
2020-12-16 08:29:03 +00:00
|
|
|
};
|
|
|
|
}
|