diff --git a/pkgs/by-name/pi/picard/package.nix b/pkgs/by-name/pi/picard/package.nix index 392c80f1ec43..db9009ebaedf 100644 --- a/pkgs/by-name/pi/picard/package.nix +++ b/pkgs/by-name/pi/picard/package.nix @@ -1,5 +1,6 @@ { lib, + stdenv, python312Packages, fetchFromGitHub, @@ -40,27 +41,55 @@ pythonPackages.buildPythonApplication (finalAttrs: { buildInputs = [ qt5.qtbase + ] + ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform qt5.qtwayland) [ qt5.qtwayland ] - ++ lib.optionals (pyqt5.multimediaEnabled) [ - qt5.qtmultimedia.bin - gst_all_1.gst-libav - gst_all_1.gst-plugins-base - gst_all_1.gst-plugins-good - gst_all_1.gst-vaapi + ++ lib.optionals (pyqt5.multimediaEnabled) ( + [ + qt5.qtmultimedia.bin + gst_all_1.gst-libav + gst_all_1.gst-plugins-base + gst_all_1.gst-plugins-good + ] + ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform gst_all_1.gst-vaapi) [ + gst_all_1.gst-vaapi + ] + ); + + pythonRelaxDeps = lib.optionals stdenv.hostPlatform.isDarwin [ + # Should be resolved in the next version + "pyobjc-core" + "pyobjc-framework-Cocoa" ]; - propagatedBuildInputs = with pythonPackages; [ - charset-normalizer - chromaprint - discid - fasteners - markdown - mutagen - pyjwt - pyqt5 - python-dateutil - pyyaml + propagatedBuildInputs = + with pythonPackages; + [ + charset-normalizer + chromaprint + discid + fasteners + markdown + mutagen + pyjwt + pyqt5 + python-dateutil + pyyaml + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + pyobjc-core + pyobjc-framework-Cocoa + ]; + + # Not reporting any of these issues because the next upstream version will + # include many breaking changes and this might not be relevant. + disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ + "test/test_const_appdirs.py::AppPathsTest::test_cache_folder_macos" # - AssertionError: '/nix/var/nix/builds/nix-54642-966088698/.h[33 chars]card' ... + "test/test_const_appdirs.py::AppPathsTest::test_config_folder_macos" # - AssertionError: '/nix/var/nix/builds/nix-54642-966088698/.h[38 chars]card' ... + "test/test_const_appdirs.py::AppPathsTest::test_plugin_folder_macos" # - AssertionError: '/nix/var/nix/builds/nix-54642-966088698/.h[46 chars]gins' ... + "test/test_plugins.py" # Various PermissionError for /var/empty/Library - hopefully will be resolved in the next release. + "test/test_utils.py::HiddenFileTest::test_macos" # - FileNotFoundError: [Errno 2] No such file or directory: 'SetFile' ]; setupPyGlobalFlags = [