diff --git a/pkgs/by-name/li/libmtp/package.nix b/pkgs/by-name/li/libmtp/package.nix index d3edc7c2cf418..f5c2eb548f089 100644 --- a/pkgs/by-name/li/libmtp/package.nix +++ b/pkgs/by-name/li/libmtp/package.nix @@ -3,6 +3,7 @@ autoconf, automake, fetchFromGitHub, + fetchpatch, gettext, lib, libiconv, @@ -23,6 +24,20 @@ stdenv.mkDerivation rec { sha256 = "sha256-hIH6W8qQ6DB4ST7SlFz6CCnLsEGOWgmUb9HoHMNA3wY="; }; + patches = [ + # gettext-0.25 support + (fetchpatch { + name = "gettext-0.25.patch"; + url = "https://github.com/libmtp/libmtp/commit/5e53ee68e61cc6547476b942b6aa9776da5d4eda.patch"; + hash = "sha256-eXDNDHg8K+ZiO9n4RqQPJrh4V9GNiK/ZxZOA/oIX83M="; + }) + (fetchpatch { + name = "gettext-0.25-p2.patch"; + url = "https://github.com/libmtp/libmtp/commit/122eb9d78b370955b9c4d7618b12a2429f01b81a.patch"; + hash = "sha256-Skqr6REBl/Egf9tS5q8k5qmEhFY+rG2fymbiu9e4Mho="; + }) + ]; + outputs = [ "bin" "dev" @@ -41,7 +56,10 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ libusb1 ]; - preConfigure = "NOCONFIGURE=1 ./autogen.sh"; + preConfigure = '' + autopoint -f + NOCONFIGURE=1 ./autogen.sh + ''; configureFlags = [ "--with-udev=${placeholder "out"}/lib/udev" ];