mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
utsushi: 3.59.2 -> unstable-2020-11-10
+ master should be roughly equivalent to 3.62.0 + moving to the community repo because they are way better at fixing things, while upstream epson almost never merges fixes + great thanks to @mwilsoncoding for debugging the problem: + `autoconf-archive` was missing
This commit is contained in:
parent
1ce26aacd1
commit
f89b4dc450
1 changed files with 30 additions and 16 deletions
|
@ -1,20 +1,32 @@
|
|||
{ stdenv, fetchFromGitLab, autoreconfHook, pkg-config, boost, gtkmm2
|
||||
, imagemagick, sane-backends, tesseract4, udev, libusb1}:
|
||||
{ stdenv, writeScriptBin, fetchFromGitLab, autoreconfHook, pkg-config
|
||||
, autoconf-archive, libxslt, boost , gtkmm2 , imagemagick, sane-backends
|
||||
, tesseract4, udev, libusb1, gnum4 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
||||
let
|
||||
fakegit = writeScriptBin "git" ''
|
||||
#! ${stdenv.shell} -e
|
||||
if [ "$1" = "describe" ]; then
|
||||
[ -r .rev ] && cat .rev || true
|
||||
fi
|
||||
'';
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "utsushi";
|
||||
version = "3.59.2";
|
||||
version = "unstable-2020-11-10";
|
||||
|
||||
src = fetchFromGitLab{
|
||||
src = fetchFromGitLab {
|
||||
owner = pname;
|
||||
repo = "imagescan";
|
||||
rev = version;
|
||||
sha256 = "06gp97dfnf43l6kb988scmm66q9n5rc7ndwv3rykrdpyhy8rbi05";
|
||||
repo = pname;
|
||||
rev = "04700043e2d16062eb8bd27f4efff3024f387d32";
|
||||
sha256 = "0rxv5n0985d414i6hwichsn7hybwgwsimpy5s4hmcsvxqcpks4li";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
pkg-config
|
||||
autoconf-archive
|
||||
fakegit
|
||||
libxslt
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
|
@ -26,19 +38,21 @@ stdenv.mkDerivation rec {
|
|||
libusb1.dev
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations -Wno-error=parentheses -Wno-error=unused-variable";
|
||||
NIX_CFLAGS_COMPILE = [
|
||||
"-Wno-error=deprecated-declarations"
|
||||
"-Wno-error=parentheses"
|
||||
"-Wno-error=unused-variable"
|
||||
];
|
||||
|
||||
|
||||
postPatch = ''
|
||||
# remove vendored dependencies
|
||||
rm -r upstream/boost
|
||||
|
||||
# create fake udev and sane config
|
||||
mkdir -p $out/etc/{sane.d,udev/rules.d}
|
||||
touch $out/etc/sane.d/dll.conf
|
||||
|
||||
# absolute paths to conver & tesseract
|
||||
# absolute paths to convert & tesseract
|
||||
sed -i '/\[AC_DEFINE(\[HAVE_IMAGE_MAGICK\], \[1\])/a \ MAGICK_CONVERT="${imagemagick}/bin/convert"' configure.ac
|
||||
substituteInPlace filters/magick.cpp \
|
||||
--replace '"convert' '"${imagemagick}/bin/convert'
|
||||
--replace 'convert ' '${imagemagick}/bin/convert '
|
||||
substituteInPlace filters/reorient.cpp \
|
||||
--replace '"tesseract' '"${tesseract4}/bin/tesseract'
|
||||
substituteInPlace filters/get-text-orientation \
|
||||
|
@ -61,7 +75,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
doInstallCheck = true;
|
||||
doInstallCheck = false;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "SANE utsushi backend for some Epson scanners";
|
||||
|
|
Loading…
Reference in a new issue