Merge pull request #311271 from jfly/fix-sublime-music-build
sublime-music: unpin dependencies, fix build
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
, gtk3
|
||||
, pango
|
||||
, wrapGAppsHook3
|
||||
, xvfb-run
|
||||
, chromecastSupport ? false
|
||||
, serverSupport ? false
|
||||
, keyringSupport ? true
|
||||
@@ -15,51 +14,18 @@
|
||||
, networkmanager
|
||||
}:
|
||||
|
||||
let
|
||||
python = python3.override {
|
||||
packageOverrides = self: super: {
|
||||
semver = super.semver.overridePythonAttrs (oldAttrs: rec {
|
||||
version = "2.13.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "python-semver";
|
||||
repo = "python-semver";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-IWTo/P9JRxBQlhtcH3JMJZZrwAA8EALF4dtHajWUc4w=";
|
||||
};
|
||||
doCheck = false; # no tests
|
||||
});
|
||||
|
||||
dataclasses-json = super.dataclasses-json.overridePythonAttrs (oldAttrs: rec {
|
||||
version = "0.5.7";
|
||||
src = fetchFromGitHub {
|
||||
owner = "lidatong";
|
||||
repo = "dataclasses-json";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-0tw5Lz+c4ymO+AGpG6THbiALWGBrehC84+yWWk1eafc=";
|
||||
};
|
||||
nativeBuildInputs = [ python3.pkgs.setuptools ];
|
||||
});
|
||||
};
|
||||
};
|
||||
in
|
||||
python.pkgs.buildPythonApplication rec {
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "sublime-music";
|
||||
version = "0.12.0";
|
||||
format = "pyproject";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sublime-music";
|
||||
repo = pname;
|
||||
repo = "sublime-music";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-FPzeFqDOcaiariz7qJwz6P3Wd+ZDxNP57uj+ptMtEyM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
python.pkgs.flit-core
|
||||
gobject-introspection
|
||||
wrapGAppsHook3
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
sed -i "/--cov/d" setup.cfg
|
||||
sed -i "/--no-cov-on-fail/d" setup.cfg
|
||||
@@ -68,6 +34,15 @@ python.pkgs.buildPythonApplication rec {
|
||||
sed -i "s/python-mpv/mpv/g" pyproject.toml
|
||||
'';
|
||||
|
||||
build-system = with python3.pkgs; [
|
||||
flit-core
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
gobject-introspection
|
||||
wrapGAppsHook3
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gtk3
|
||||
pango
|
||||
@@ -76,7 +51,7 @@ python.pkgs.buildPythonApplication rec {
|
||||
++ lib.optional networkSupport networkmanager
|
||||
;
|
||||
|
||||
propagatedBuildInputs = with python.pkgs; [
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
bleach
|
||||
bottle
|
||||
dataclasses-json
|
||||
@@ -94,13 +69,14 @@ python.pkgs.buildPythonApplication rec {
|
||||
++ lib.optional keyringSupport keyring
|
||||
;
|
||||
|
||||
nativeCheckInputs = with python.pkgs; [
|
||||
pytest
|
||||
nativeCheckInputs = with python3.pkgs; [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
${xvfb-run}/bin/xvfb-run pytest
|
||||
'';
|
||||
disabledTests = [
|
||||
# https://github.com/sublime-music/sublime-music/issues/439
|
||||
"test_get_music_directory"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"sublime_music"
|
||||
@@ -118,10 +94,10 @@ python.pkgs.buildPythonApplication rec {
|
||||
|
||||
meta = with lib; {
|
||||
description = "GTK3 Subsonic/Airsonic client";
|
||||
mainProgram = "sublime-music";
|
||||
homepage = "https://sublimemusic.app/";
|
||||
changelog = "https://github.com/sublime-music/sublime-music/blob/v${version}/CHANGELOG.rst";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ albakham sumnerevans ];
|
||||
mainProgram = "sublime-music";
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user