Merge pull request #311271 from jfly/fix-sublime-music-build

sublime-music: unpin dependencies, fix build

authored by Fabian Affolter and committed by GitHub a8f43e8a 9367a2b5

+20 -44
+20 -44
pkgs/applications/audio/sublime-music/default.nix
··· 5 5 , gtk3 6 6 , pango 7 7 , wrapGAppsHook3 8 - , xvfb-run 9 8 , chromecastSupport ? false 10 9 , serverSupport ? false 11 10 , keyringSupport ? true ··· 15 14 , networkmanager 16 15 }: 17 16 18 - let 19 - python = python3.override { 20 - packageOverrides = self: super: { 21 - semver = super.semver.overridePythonAttrs (oldAttrs: rec { 22 - version = "2.13.0"; 23 - src = fetchFromGitHub { 24 - owner = "python-semver"; 25 - repo = "python-semver"; 26 - rev = "refs/tags/${version}"; 27 - hash = "sha256-IWTo/P9JRxBQlhtcH3JMJZZrwAA8EALF4dtHajWUc4w="; 28 - }; 29 - doCheck = false; # no tests 30 - }); 31 - 32 - dataclasses-json = super.dataclasses-json.overridePythonAttrs (oldAttrs: rec { 33 - version = "0.5.7"; 34 - src = fetchFromGitHub { 35 - owner = "lidatong"; 36 - repo = "dataclasses-json"; 37 - rev = "refs/tags/v${version}"; 38 - hash = "sha256-0tw5Lz+c4ymO+AGpG6THbiALWGBrehC84+yWWk1eafc="; 39 - }; 40 - nativeBuildInputs = [ python3.pkgs.setuptools ]; 41 - }); 42 - }; 43 - }; 44 - in 45 - python.pkgs.buildPythonApplication rec { 17 + python3.pkgs.buildPythonApplication rec { 46 18 pname = "sublime-music"; 47 19 version = "0.12.0"; 48 - format = "pyproject"; 20 + pyproject = true; 49 21 50 22 src = fetchFromGitHub { 51 23 owner = "sublime-music"; 52 - repo = pname; 24 + repo = "sublime-music"; 53 25 rev = "refs/tags/v${version}"; 54 26 hash = "sha256-FPzeFqDOcaiariz7qJwz6P3Wd+ZDxNP57uj+ptMtEyM="; 55 27 }; 56 - 57 - nativeBuildInputs = [ 58 - python.pkgs.flit-core 59 - gobject-introspection 60 - wrapGAppsHook3 61 - ]; 62 28 63 29 postPatch = '' 64 30 sed -i "/--cov/d" setup.cfg ··· 68 34 sed -i "s/python-mpv/mpv/g" pyproject.toml 69 35 ''; 70 36 37 + build-system = with python3.pkgs; [ 38 + flit-core 39 + ]; 40 + 41 + nativeBuildInputs = [ 42 + gobject-introspection 43 + wrapGAppsHook3 44 + ]; 45 + 71 46 buildInputs = [ 72 47 gtk3 73 48 pango ··· 76 51 ++ lib.optional networkSupport networkmanager 77 52 ; 78 53 79 - propagatedBuildInputs = with python.pkgs; [ 54 + propagatedBuildInputs = with python3.pkgs; [ 80 55 bleach 81 56 bottle 82 57 dataclasses-json ··· 94 69 ++ lib.optional keyringSupport keyring 95 70 ; 96 71 97 - nativeCheckInputs = with python.pkgs; [ 98 - pytest 72 + nativeCheckInputs = with python3.pkgs; [ 73 + pytestCheckHook 99 74 ]; 100 75 101 - checkPhase = '' 102 - ${xvfb-run}/bin/xvfb-run pytest 103 - ''; 76 + disabledTests = [ 77 + # https://github.com/sublime-music/sublime-music/issues/439 78 + "test_get_music_directory" 79 + ]; 104 80 105 81 pythonImportsCheck = [ 106 82 "sublime_music" ··· 118 94 119 95 meta = with lib; { 120 96 description = "GTK3 Subsonic/Airsonic client"; 121 - mainProgram = "sublime-music"; 122 97 homepage = "https://sublimemusic.app/"; 123 98 changelog = "https://github.com/sublime-music/sublime-music/blob/v${version}/CHANGELOG.rst"; 124 99 license = licenses.gpl3Plus; 125 100 maintainers = with maintainers; [ albakham sumnerevans ]; 101 + mainProgram = "sublime-music"; 126 102 }; 127 103 }