feh: fix failing testPhase

The update of imlib2 from 1.8.1 to 1.9.1 changed the warning messages
when trying to open empty image files. This caused some tests of feh to
fail. Therefore we change the expected warning in test/feh.t during the
postPatch phase.
This commit is contained in:
kilianar 2022-07-10 22:25:47 +02:00
parent 62f2aebc4d
commit 7a1fcc94a7

View file

@ -1,5 +1,5 @@
{ lib, stdenv, fetchFromGitHub, makeWrapper
, xorg, imlib2, libjpeg, libpng, fetchpatch
, xorg, imlib2, libjpeg, libpng
, curl, libexif, jpegexiforient, perl
, enableAutoreload ? !stdenv.hostPlatform.isDarwin }:
@ -14,13 +14,11 @@ stdenv.mkDerivation rec {
sha256 = "sha256-rgNC4M1TJ5EPeWmVHVzgaxTGLY7CYQf7uOsOn5bkwKE=";
};
patches = [
# fix test failure when magic=0 is set
(fetchpatch {
url = "https://github.com/derf/feh/commit/3c1076b31e2e4e3429a5c3d334d555e549fb72d2.patch";
sha256 = "sha256-F9N+N/BAeclyPHQYlO9ZV1U8S1VWfHl/8dMKUqA7DF8=";
})
];
postPatch = ''
substituteInPlace test/feh.t \
--replace "WARNING:" "WARNING: While loading" \
--replace "Does not look like an image \(magic bytes missing\)" "Unknown error \(15\)"
'';
outputs = [ "out" "man" "doc" ];