2023-02-02 18:25:31 +00:00
|
|
|
{ lib
|
2023-05-24 13:37:59 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, python3
|
2021-04-22 02:08:21 +00:00
|
|
|
, gobject-introspection
|
|
|
|
, gtk3
|
|
|
|
, pango
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3
|
2020-08-20 17:08:02 +00:00
|
|
|
, chromecastSupport ? false
|
|
|
|
, serverSupport ? false
|
|
|
|
, keyringSupport ? true
|
2023-02-02 18:25:31 +00:00
|
|
|
, notifySupport ? true
|
|
|
|
, libnotify
|
|
|
|
, networkSupport ? true
|
|
|
|
, networkmanager
|
2020-08-20 17:08:02 +00:00
|
|
|
}:
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2020-08-20 17:08:02 +00:00
|
|
|
pname = "sublime-music";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "0.12.0";
|
2024-06-05 15:53:02 +00:00
|
|
|
pyproject = true;
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
src = fetchFromGitHub {
|
2021-04-05 15:23:46 +00:00
|
|
|
owner = "sublime-music";
|
2024-06-05 15:53:02 +00:00
|
|
|
repo = "sublime-music";
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-FPzeFqDOcaiariz7qJwz6P3Wd+ZDxNP57uj+ptMtEyM=";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i "/--cov/d" setup.cfg
|
|
|
|
sed -i "/--no-cov-on-fail/d" setup.cfg
|
2023-08-10 07:59:29 +00:00
|
|
|
|
|
|
|
# https://github.com/sublime-music/sublime-music/commit/f477659d24e372ed6654501deebad91ae4b0b51c
|
|
|
|
sed -i "s/python-mpv/mpv/g" pyproject.toml
|
2023-02-02 18:25:31 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = with python3.pkgs; [
|
|
|
|
flit-core
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
gobject-introspection
|
|
|
|
wrapGAppsHook3
|
|
|
|
];
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
buildInputs = [
|
|
|
|
gtk3
|
|
|
|
pango
|
|
|
|
]
|
2023-02-02 18:25:31 +00:00
|
|
|
++ lib.optional notifySupport libnotify
|
|
|
|
++ lib.optional networkSupport networkmanager
|
2020-08-20 17:08:02 +00:00
|
|
|
;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
2021-04-05 15:23:46 +00:00
|
|
|
bleach
|
2023-07-15 17:15:38 +00:00
|
|
|
bottle
|
2020-08-20 17:08:02 +00:00
|
|
|
dataclasses-json
|
|
|
|
deepdiff
|
2023-07-15 17:15:38 +00:00
|
|
|
levenshtein
|
2020-08-20 17:08:02 +00:00
|
|
|
mpv
|
|
|
|
peewee
|
2023-07-15 17:15:38 +00:00
|
|
|
pychromecast
|
2020-08-20 17:08:02 +00:00
|
|
|
pygobject3
|
|
|
|
python-dateutil
|
|
|
|
requests
|
|
|
|
semver
|
2023-07-15 17:15:38 +00:00
|
|
|
thefuzz
|
2020-08-20 17:08:02 +00:00
|
|
|
]
|
2023-02-02 18:25:31 +00:00
|
|
|
++ lib.optional keyringSupport keyring
|
2020-08-20 17:08:02 +00:00
|
|
|
;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = with python3.pkgs; [
|
|
|
|
pytestCheckHook
|
2021-04-22 02:08:21 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTests = [
|
|
|
|
# https://github.com/sublime-music/sublime-music/issues/439
|
|
|
|
"test_get_music_directory"
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"sublime_music"
|
|
|
|
];
|
2021-04-05 15:23:46 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
install -Dm444 sublime-music.desktop -t $out/share/applications
|
|
|
|
install -Dm444 sublime-music.metainfo.xml -t $out/share/metainfo
|
|
|
|
|
|
|
|
for size in 16 22 32 48 64 72 96 128 192 512 1024; do
|
|
|
|
install -Dm444 logo/rendered/"$size".png \
|
|
|
|
$out/share/icons/hicolor/"$size"x"$size"/apps/sublime-music.png
|
|
|
|
done
|
|
|
|
'';
|
2021-01-09 10:05:03 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "GTK3 Subsonic/Airsonic client";
|
|
|
|
homepage = "https://sublimemusic.app/";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/sublime-music/sublime-music/blob/v${version}/CHANGELOG.rst";
|
2020-08-20 17:08:02 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2021-04-05 15:23:46 +00:00
|
|
|
maintainers = with maintainers; [ albakham sumnerevans ];
|
2024-06-05 15:53:02 +00:00
|
|
|
mainProgram = "sublime-music";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
}
|