nixpkgs/pkgs/tools/graphics/scanbd/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

56 lines
1.8 KiB
Nix

{ lib, stdenv, fetchurl, pkgconfig
, dbus, libconfuse, libjpeg, sane-backends, systemd }:
stdenv.mkDerivation rec {
pname = "scanbd";
version = "1.5.1";
src = fetchurl {
sha256 = "0pvy4qirfjdfm8aj6x5rkbgl7hk3jfa2s21qkk8ic5dqfjjab75n";
url = "mirror://sourceforge/scanbd/${pname}-${version}.tgz";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ dbus libconfuse libjpeg sane-backends systemd ];
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;
meta = with lib; {
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.
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.
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)
scanbuttond project.
'';
homepage = "http://scanbd.sourceforge.net/";
downloadPage = "https://sourceforge.net/projects/scanbd/";
license = licenses.gpl2Plus;
platforms = platforms.linux;
};
}