summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/cu/cups-browsed/package.nix
blob: 4f85130c12db3465bffd964be17800d749d7593f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{
  autoreconfHook,
  avahi,
  cups,
  fetchFromGitHub,
  glib,
  lib,
  libcupsfilters,
  libppd,
  pkg-config,
  stdenv,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "cups-browsed";
  version = "2.1.1";

  src = fetchFromGitHub {
    owner = "OpenPrinting";
    repo = "cups-browsed";
    rev = finalAttrs.version;
    hash = "sha256-Cfk28rxxgzzQs7B+tNmeUzDYL1eCx9zYwRsS/J6QX9s=";
  };

  nativeBuildInputs = [
    autoreconfHook
    cups
    glib # Required for gdbus-codegen
    pkg-config
  ];

  buildInputs = [
    avahi
    cups
    glib
    libcupsfilters
    libppd
  ];

  configureFlags = [
    "--with-rcdir=no"
  ];

  makeFlags = [
    "CUPS_SERVERBIN=$(out)/lib/cups"
    "CUPS_DATADIR=$(out)/share/cups"
    "CUPS_SERVERROOT=$(out)/etc/cups"
  ];

  meta = {
    description = "Daemon for browsing the Bonjour broadcasts of shared, remote CUPS printers";
    homepage = "https://github.com/OpenPrinting/cups-browsed";
    license = lib.licenses.asl20;
    mainProgram = "cups-browsed";
    platforms = lib.platforms.linux;
  };
})