nixpkgs/pkgs/by-name/pa/pappl/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

75 lines
1.5 KiB
Nix
Raw Normal View History

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-11-30 05:09:46 +00:00
version = "1.4.8";
2020-12-16 08:29:03 +00:00
src = fetchFromGitHub {
owner = "michaelrsweet";
repo = "pappl";
2024-10-15 22:47:51 +00:00
rev = "refs/tags/v${version}";
2024-11-30 05:09:46 +00:00
hash = "sha256-vp0DQvsQzuiXb5QAXVEcXNvyDJeRM99aO9/baZw9QwA=";
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;
meta = {
2020-12-16 08:29:03 +00:00
description = "C-based framework/library for developing CUPS Printer Applications";
changelog = "https://github.com/michaelrsweet/pappl/blob/v${version}/CHANGES.md";
mainProgram = "pappl-makeresheader";
2020-12-16 08:29:03 +00:00
homepage = "https://github.com/michaelrsweet/pappl";
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
};
}