2021-04-05 15:23:46 +00:00
|
|
|
{ fetchFromGitLab, lib, python3Packages, gobject-introspection, gtk3, pango, wrapGAppsHook
|
2020-08-20 17:08:02 +00:00
|
|
|
, chromecastSupport ? false
|
|
|
|
, serverSupport ? false
|
|
|
|
, keyringSupport ? true
|
|
|
|
, notifySupport ? true, libnotify
|
|
|
|
, networkSupport ? true, networkmanager
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "sublime-music";
|
2021-04-05 15:23:46 +00:00
|
|
|
version = "0.11.10";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "sublime-music";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1g78gmiywg07kaywfc9q0yab2bzxs936vb3157ni1z0flbmcwrry";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
gobject-introspection
|
|
|
|
python3Packages.setuptools
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gtk3
|
|
|
|
pango
|
|
|
|
]
|
|
|
|
++ lib.optional notifySupport libnotify
|
|
|
|
++ lib.optional networkSupport networkmanager
|
|
|
|
;
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3Packages; [
|
2021-04-05 15:23:46 +00:00
|
|
|
bleach
|
2020-08-20 17:08:02 +00:00
|
|
|
dataclasses-json
|
|
|
|
deepdiff
|
|
|
|
fuzzywuzzy
|
|
|
|
mpv
|
|
|
|
peewee
|
|
|
|
pygobject3
|
|
|
|
python-Levenshtein
|
|
|
|
python-dateutil
|
|
|
|
requests
|
|
|
|
semver
|
|
|
|
]
|
|
|
|
++ lib.optional chromecastSupport PyChromecast
|
|
|
|
++ lib.optional keyringSupport keyring
|
|
|
|
++ lib.optional serverSupport bottle
|
|
|
|
;
|
|
|
|
|
|
|
|
# hook for gobject-introspection doesn't like strictDeps
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/56943
|
|
|
|
strictDeps = false;
|
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
# no tests
|
|
|
|
doCheck = false;
|
2021-04-05 15:23:46 +00:00
|
|
|
pythonImportsCheck = [ "sublime_music" ];
|
|
|
|
|
|
|
|
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/";
|
|
|
|
license = licenses.gpl3Plus;
|
2021-04-05 15:23:46 +00:00
|
|
|
maintainers = with maintainers; [ albakham sumnerevans ];
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
}
|