xloadimage: fix patch application

Without the change patches fail to apply as `$patches` contain compressed
tarball: https://hydra.nixos.org/build/300549687

    applying patch /nix/store/q5k4nisc8dix97imsxlsj6m9pmkjjfcs-xloadimage_4.1-25.debian.tar.xz
    patch: **** patch line 1 contains NUL byte

With `patch-2.8` it will become an error.
This commit is contained in:
Sergei Trofimovich 2025-07-14 20:27:22 +01:00
parent 4e806e6f5e
commit ac000d58a6

View File

@ -2,9 +2,11 @@
lib, lib,
stdenv, stdenv,
fetchurl, fetchurl,
fetchzip,
libX11, libX11,
libXt, libXt,
autoreconfHook, autoreconfHook,
quilt,
libjpeg ? null, libjpeg ? null,
libpng ? null, libpng ? null,
@ -20,23 +22,30 @@ assert withPngSupport -> libpng != null;
assert withTiffSupport -> libtiff != null; assert withTiffSupport -> libtiff != null;
let let
version = "4.1";
deb_patch = "25"; deb_patch = "25";
debian_patches = fetchzip {
url = "mirror://debian/pool/main/x/xloadimage/xloadimage_${version}-${deb_patch}.debian.tar.xz";
hash = "sha256-5FbkiYjI8ASUyi1DTFiAcJ9y2z1sEKrNNyKoqnca30I=";
};
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "4.1";
pname = "xloadimage"; pname = "xloadimage";
inherit version;
src = fetchurl { src = fetchurl {
url = "mirror://debian/pool/main/x/xloadimage/xloadimage_${version}.orig.tar.gz"; url = "mirror://debian/pool/main/x/xloadimage/xloadimage_${version}.orig.tar.gz";
sha256 = "1i7miyvk5ydhi6yi8593vapavhwxcwciir8wg9d2dcyg9pccf2s0"; sha256 = "1i7miyvk5ydhi6yi8593vapavhwxcwciir8wg9d2dcyg9pccf2s0";
}; };
patches = fetchurl { postPatch = ''
url = "mirror://debian/pool/main/x/xloadimage/xloadimage_${version}-${deb_patch}.debian.tar.xz"; QUILT_PATCHES=${debian_patches}/patches quilt push -a
sha256 = "17k518vrdrya5c9dqhpmm4g0h2vlkq1iy87sg2ngzygypbli1xvn"; '';
};
nativeBuildInputs = [ autoreconfHook ]; nativeBuildInputs = [
autoreconfHook
quilt
];
buildInputs = buildInputs =
[ [