2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, sane-backends, sane-frontends, libX11, gtk2, pkg-config, libpng
|
2020-05-03 17:38:23 +00:00
|
|
|
, libusb-compat-0_1 ? null
|
2020-04-24 23:36:52 +00:00
|
|
|
, gimpSupport ? false, gimp ? null
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert gimpSupport -> gimp != null;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "xsane-0.999";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.xsane.org/download/${name}.tar.gz";
|
|
|
|
sha256 = "0jrb918sfb9jw3vmrz0z7np4q55hgsqqffpixs0ir5nwcwzd50jp";
|
|
|
|
};
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
sed -e '/SANE_CAP_ALWAYS_SETTABLE/d' -i src/xsane-back-gtk.c
|
|
|
|
chmod a+rX -R .
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [libpng sane-backends sane-frontends libX11 gtk2 ]
|
2020-05-03 17:38:23 +00:00
|
|
|
++ (if libusb-compat-0_1 != null then [libusb-compat-0_1] else [])
|
2021-01-17 00:15:33 +00:00
|
|
|
++ lib.optional gimpSupport gimp;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "http://www.sane-project.org/";
|
|
|
|
description = "Graphical scanning frontend for sane";
|
2021-01-17 00:15:33 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
platforms = with lib.platforms; linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|