libmtp: fix cross

This commit is contained in:
Alyssa Ross 2023-04-24 20:34:25 +00:00
parent 645bc49f34
commit 1dbfe290ee
No known key found for this signature in database
GPG Key ID: F9DBED4859B271C0

View File

@ -2,12 +2,14 @@
, autoconf
, automake
, fetchFromGitHub
, fetchpatch
, gettext
, lib
, libiconv
, libtool
, libusb1
, pkg-config
, buildPackages
}:
stdenv.mkDerivation rec {
@ -21,6 +23,14 @@ stdenv.mkDerivation rec {
sha256 = "sha256-/tyCoEW/rCLfZH2HhA3Nxuij9d/ZJgsfyP4fLlfyNRA=";
};
patches = [
# Backport cross fix.
(fetchpatch {
url = "https://github.com/libmtp/libmtp/commit/467fa26e6b14c0884b15cf6d191de97e5513fe05.patch";
sha256 = "2DrRrdcguJ9su4LxtT6YOjer8gUTxIoHVpk+6M9P4cg=";
})
];
outputs = [ "bin" "dev" "out" ];
nativeBuildInputs = [
@ -41,6 +51,10 @@ stdenv.mkDerivation rec {
configurePlatforms = [ "build" "host" ];
makeFlags = lib.optionals (stdenv.isLinux && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
"MTP_HOTPLUG=${buildPackages.libmtp}/bin/mtp-hotplug"
];
enableParallelBuilding = true;
meta = with lib; {