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

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

64 lines
1.3 KiB
Nix
Raw Normal View History

2020-12-16 08:29:03 +00:00
{ lib, stdenv, fetchFromGitHub
, avahi
, cups
, gnutls
, libjpeg
, libpng
, libusb1
, pkg-config
, withPAMSupport ? true, pam
, zlib
}:
stdenv.mkDerivation rec {
pname = "pappl";
version = "1.4.7";
2020-12-16 08:29:03 +00:00
src = fetchFromGitHub {
owner = "michaelrsweet";
repo = pname;
rev = "v${version}";
sha256 = "sha256-Npry3H+QbAH19hoqAZuOwjpZwCPhOLewD8uKZlo4gdQ=";
2020-12-16 08:29:03 +00:00
};
outputs = [ "out" "dev" ];
nativeBuildInputs = [
pkg-config
];
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
];
# 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
maintainers = [ ];
2020-12-16 08:29:03 +00:00
};
}