cups-filters: make it easier to disable avahi

: previous override code to do this was :
  cups-filters = prev.lib.pipe prev.cups-filters [
    (x: x.overrideAttrs (old: { configureFlags = old.configureFlags ++ ["--disable-avahi"]; }))
    (x: x.override { avahi = null; })
  ];

: new override code to do this is :
  cups-filters = prev.cups-filters.override { withAvahi = false; };
This commit is contained in:
zseri 2021-12-02 09:30:27 +01:00
parent a91e85efa3
commit 9a93279738

View file

@ -24,6 +24,7 @@
, qpdf
, stdenv
, which
, withAvahi ? true
}:
let
@ -42,7 +43,6 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkg-config makeWrapper ];
buildInputs = [
avahi
cups
dbus
fontconfig
@ -56,7 +56,7 @@ stdenv.mkDerivation rec {
poppler
poppler_utils
qpdf
];
] ++ lib.optionals withAvahi [ avahi ];
configureFlags = [
"--with-mutool-path=${mupdf}/bin/mutool"
@ -71,7 +71,7 @@ stdenv.mkDerivation rec {
"--with-test-font-path=${dejavu_fonts}/share/fonts/truetype/DejaVuSans.ttf"
"--localstatedir=/var"
"--sysconfdir=/etc"
];
] ++ lib.optionals (!withAvahi) [ "--disable-avahi" ];
makeFlags = [ "CUPS_SERVERBIN=$(out)/lib/cups" "CUPS_DATADIR=$(out)/share/cups" "CUPS_SERVERROOT=$(out)/etc/cups" ];