mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-14 09:43:14 +00:00
libmtp: fix cross
This commit is contained in:
parent
645bc49f34
commit
1dbfe290ee
@ -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; {
|
||||
|
Loading…
Reference in New Issue
Block a user