Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 051345a82324
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4d187fc6b9f0
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Nov 14, 2020

  1. 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
    wucke13 committed Nov 14, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    zimbatm Jonas Chevalier
    Copy the full SHA
    f89b4dc View commit details
  2. Merge pull request #76909 from wucke13/utsushi

    utsushi: 3.59.2 -> unstable-2020-11-10
    Lassulus authored Nov 14, 2020
    Copy the full SHA
    4d187fc View commit details
Showing with 30 additions and 16 deletions.
  1. +30 −16 pkgs/misc/drivers/utsushi/default.nix
46 changes: 30 additions & 16 deletions pkgs/misc/drivers/utsushi/default.nix
Original file line number Diff line number Diff line change
@@ -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";