1{
2 autoreconfHook,
3 avahi,
4 cups,
5 fetchFromGitHub,
6 glib,
7 lib,
8 libcupsfilters,
9 libppd,
10 pkg-config,
11 stdenv,
12}:
13
14stdenv.mkDerivation rec {
15 pname = "cups-browsed";
16 version = "2.1.1";
17
18 src = fetchFromGitHub {
19 owner = "OpenPrinting";
20 repo = "cups-browsed";
21 rev = version;
22 hash = "sha256-Cfk28rxxgzzQs7B+tNmeUzDYL1eCx9zYwRsS/J6QX9s=";
23 };
24
25 nativeBuildInputs = [
26 autoreconfHook
27 cups
28 glib # Required for gdbus-codegen
29 pkg-config
30 ];
31
32 buildInputs = [
33 avahi
34 cups
35 glib
36 libcupsfilters
37 libppd
38 ];
39
40 configureFlags = [
41 "--with-rcdir=no"
42 ];
43
44 makeFlags = [
45 "CUPS_SERVERBIN=$(out)/lib/cups"
46 "CUPS_DATADIR=$(out)/share/cups"
47 "CUPS_SERVERROOT=$(out)/etc/cups"
48 ];
49
50 meta = {
51 description = "Daemon for browsing the Bonjour broadcasts of shared, remote CUPS printers";
52 homepage = "https://github.com/OpenPrinting/cups-browsed";
53 license = lib.licenses.asl20;
54 mainProgram = "cups-browsed";
55 platforms = lib.platforms.linux;
56 };
57}