2021-01-17 09:17:16 +00:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config
|
2016-06-17 22:56:47 +01:00
|
|
|
, dbus, libconfuse, libjpeg, sane-backends, systemd }:
|
2016-01-25 02:21:29 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "scanbd";
|
2018-02-27 23:45:28 +00:00
|
|
|
version = "1.5.1";
|
2016-01-25 02:21:29 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-02-27 23:45:28 +00:00
|
|
|
sha256 = "0pvy4qirfjdfm8aj6x5rkbgl7hk3jfa2s21qkk8ic5dqfjjab75n";
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "mirror://sourceforge/scanbd/${pname}-${version}.tgz";
|
2016-01-25 02:21:29 +00:00
|
|
|
};
|
|
|
|
|
2021-01-17 09:17:16 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2016-06-17 22:56:47 +01:00
|
|
|
buildInputs = [ dbus libconfuse libjpeg sane-backends systemd ];
|
2016-01-25 02:21:29 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--disable-Werror"
|
|
|
|
"--enable-udev"
|
|
|
|
"--with-scanbdconfdir=/etc/scanbd"
|
|
|
|
"--with-systemdsystemunitdir=$out/lib/systemd/system"
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
installFlags = [
|
|
|
|
"scanbdconfdir=$(out)/etc/scanbd"
|
|
|
|
"scannerconfdir=$(scanbdconfdir)/scanner.d"
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2016-01-25 02:21:29 +00:00
|
|
|
description = "Scanner button daemon";
|
|
|
|
longDescription = ''
|
|
|
|
scanbd polls a scanner's buttons, looking for button presses, function
|
|
|
|
knob changes, or other scanner events such as paper inserts and removals,
|
|
|
|
while at the same time allowing scan-applications to access the scanner.
|
2021-01-19 21:20:11 +00:00
|
|
|
|
2016-01-25 02:21:29 +00:00
|
|
|
Various actions can be submitted (scan, copy, email, ...) via action
|
|
|
|
scripts. The function knob values are passed to the action scripts as
|
|
|
|
well. Scan actions are also signaled via dbus. This can be useful for
|
|
|
|
foreign applications. Scans can also be triggered via dbus from foreign
|
|
|
|
applications.
|
2021-01-19 21:20:11 +00:00
|
|
|
|
2016-01-25 02:21:29 +00:00
|
|
|
On platforms which support signaling of dynamic device insertion/removal
|
|
|
|
(libudev, dbus, hal), scanbd supports this as well.
|
|
|
|
|
|
|
|
scanbd can use all sane-backends or some special backends from the (old)
|
2021-01-19 21:20:11 +00:00
|
|
|
scanbuttond project.
|
2016-01-25 02:21:29 +00:00
|
|
|
'';
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://scanbd.sourceforge.net/";
|
|
|
|
downloadPage = "https://sourceforge.net/projects/scanbd/";
|
2016-01-25 02:21:29 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|