2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2023-02-02 18:25:31 +00:00
|
|
|
, fetchFromGitLab
|
2021-12-06 16:07:01 +00:00
|
|
|
, sane-backends
|
|
|
|
, sane-frontends
|
|
|
|
, libX11
|
|
|
|
, gtk2
|
|
|
|
, pkg-config
|
|
|
|
, libpng
|
|
|
|
, libusb-compat-0_1
|
|
|
|
, gimpSupport ? false
|
|
|
|
, gimp
|
2023-02-02 18:25:31 +00:00
|
|
|
, nix-update-script
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "xsane";
|
|
|
|
version = "0.999";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "frontend";
|
|
|
|
group = "sane-project";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
hash = "sha256-oOg94nUsT9LLKnHocY0S5g02Y9a1UazzZAjpEI/s+yM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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 ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
buildInputs = [ libpng libusb-compat-0_1 sane-backends sane-frontends libX11 gtk2 ]
|
2021-01-17 00:15:33 +00:00
|
|
|
++ lib.optional gimpSupport gimp;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://www.sane-project.org/";
|
|
|
|
description = "Graphical scanning frontend for sane";
|
2021-12-06 16:07:01 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
2023-02-02 18:25:31 +00:00
|
|
|
maintainers = with maintainers; [ melling ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|