diff --git a/pkgs/applications/video/mpv/default.nix b/pkgs/applications/video/mpv/default.nix index cf81c0e0446c..beb6c70f4eea 100644 --- a/pkgs/applications/video/mpv/default.nix +++ b/pkgs/applications/video/mpv/default.nix @@ -24,6 +24,7 @@ , waylandSupport ? stdenv.isLinux , wayland , wayland-protocols + , wayland-scanner , libxkbcommon , x11Support ? stdenv.isLinux @@ -100,6 +101,10 @@ in stdenv.mkDerivation rec { NIX_LDFLAGS = lib.optionalString x11Support "-lX11 -lXext " + lib.optionalString stdenv.isDarwin "-framework CoreFoundation"; + # These flags are not supported and cause the build + # to fail, even when cross compilation itself works. + dontAddWafCrossFlags = true; + wafConfigureFlags = [ "--enable-libmpv-shared" "--enable-manpage-build" @@ -127,7 +132,8 @@ in stdenv.mkDerivation rec { python3 wafHook which - ] ++ lib.optionals swiftSupport [ swift ]; + ] ++ lib.optionals swiftSupport [ swift ] + ++ lib.optionals waylandSupport [ wayland-scanner ]; buildInputs = [ ffmpeg diff --git a/pkgs/development/python-modules/setuptools/default.nix b/pkgs/development/python-modules/setuptools/default.nix index 883ca18e93e4..2d3c06d602f1 100644 --- a/pkgs/development/python-modules/setuptools/default.nix +++ b/pkgs/development/python-modules/setuptools/default.nix @@ -1,6 +1,7 @@ { stdenv , buildPythonPackage , fetchFromGitHub +, fetchpatch , python , bootstrapped-pip , lib @@ -27,6 +28,14 @@ let patches = [ ./tag-date.patch ./setuptools-distutils-C++.patch + # Fix cross compilation of extension modules + # https://github.com/pypa/distutils/pull/173 + (fetchpatch { + url = "https://github.com/pypa/distutils/commit/22b9bcf2e2d2a66f7dc96661312972e2f6bd9e01.patch"; + hash = "sha256-IVb1LLgLIHO6HPn2911uksrLB1jG0MyQetdxkq5wcG4="; + stripLen = 2; + extraPrefix = "setuptools/_distutils/"; + }) ]; buildPhase = ''