From ffc04a67e3aa54fdcf162dfdec9fc85535b5e251 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 14 Dec 2015 18:23:29 +0100 Subject: [PATCH] sanebackends{,Git}: add avahi support --- pkgs/applications/graphics/sane/backends-git.nix | 8 ++++++-- pkgs/applications/graphics/sane/backends.nix | 9 ++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/graphics/sane/backends-git.nix b/pkgs/applications/graphics/sane/backends-git.nix index 149d9a70610..bf9f4f5c01f 100644 --- a/pkgs/applications/graphics/sane/backends-git.nix +++ b/pkgs/applications/graphics/sane/backends-git.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl, fetchgit, libusb ? null, net_snmp ? null +{ stdenv, fetchurl, fetchgit +, avahi ? null, libusb ? null, net_snmp ? null , gt68xxFirmware ? null, snapscanFirmware ? null , hotplugSupport ? true }: @@ -19,9 +20,12 @@ stdenv.mkDerivation { udevSupport = hotplugSupport; - buildInputs = [ net_snmp ] + buildInputs = [ avahi net_snmp ] ++ stdenv.lib.optional (libusb != null) libusb; + configureFlags = [] + ++ stdenv.lib.optional (avahi != null) "--enable-avahi"; + postInstall = '' if test "$udevSupport" = "1"; then mkdir -p $out/etc/udev/rules.d/ diff --git a/pkgs/applications/graphics/sane/backends.nix b/pkgs/applications/graphics/sane/backends.nix index b96f7a4dbc8..637ed7a2024 100644 --- a/pkgs/applications/graphics/sane/backends.nix +++ b/pkgs/applications/graphics/sane/backends.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl, libusb ? null, libv4l ? null, net_snmp ? null +{ stdenv, fetchurl +, avahi ? null, libusb ? null, libv4l ? null, net_snmp ? null , pkgconfig ? null , gt68xxFirmware ? null, snapscanFirmware ? null , hotplugSupport ? true @@ -26,9 +27,11 @@ stdenv.mkDerivation rec { udevSupport = hotplugSupport; - configureFlags = stdenv.lib.optional (libusb != null) "--enable-libusb_1_0"; + configureFlags = [] + ++ stdenv.lib.optional (avahi != null) "--enable-avahi" + ++ stdenv.lib.optional (libusb != null) "--enable-libusb_1_0"; - buildInputs = [ net_snmp ] + buildInputs = [ avahi net_snmp ] ++ stdenv.lib.optional (libusb != null) libusb ++ stdenv.lib.optional (libv4l != null) libv4l ++ stdenv.lib.optional (pkgconfig != null) pkgconfig