Merge pull request #245501 from onny/onthespot

onthespot: init at 0.5
This commit is contained in:
Jonas Heinrich 2023-07-29 14:45:39 +02:00 committed by GitHub
commit 52858df957
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 172 additions and 0 deletions

View file

@ -0,0 +1,64 @@
{ lib
, python3
, fetchFromGitHub
, copyDesktopItems
, wrapQtAppsHook
, makeDesktopItem
}:
python3.pkgs.buildPythonApplication rec {
pname = "onthespot";
version = "0.5";
format = "pyproject";
src = fetchFromGitHub {
owner = "casualsnek";
repo = "onthespot";
rev = "v${version}";
hash = "sha256-VaJBNsT7uNOGY43GnzhUqDQNiPoFZcc2UaIfOKgkufg=";
};
nativeBuildInputs = with python3.pkgs; [
copyDesktopItems
pythonRelaxDepsHook
wrapQtAppsHook
];
propagatedBuildInputs = with python3.pkgs; [
charset-normalizer
defusedxml
librespot
music-tag
packaging
pillow
protobuf
pyogg
pyqt5
pyqt5_sip
pyxdg
requests
setuptools
show-in-file-manager
urllib3
zeroconf
];
pythonRemoveDeps = [
"PyQt5-Qt5"
"PyQt5-stubs"
];
pythonRelaxDeps = true;
preFixup = ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
'';
meta = {
description = " QT based Spotify music downloader written in Python";
homepage = "https://github.com/casualsnek/onthespot";
license = lib.licenses.gpl2;
maintainers = with lib.maintainers; [ onny ];
platforms = lib.platforms.linux;
};
}

View file

@ -0,0 +1,61 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, defusedxml
, protobuf
, pythonRelaxDepsHook
, websocket-client
, pyogg
, zeroconf
, requests
, pycryptodomex
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "librespot";
version = "0.0.9";
format = "setuptools";
src = fetchFromGitHub {
owner = "kokarare1212";
repo = "librespot-python";
rev = "v${version}";
hash = "sha256-k9qVsxjRlUZ7vCBx00quiAR7S+YkfyoZiAKVnOOG4xM=";
};
nativeBuildInputs = [
pythonRelaxDepsHook
];
propagatedBuildInputs = [
defusedxml
protobuf
pycryptodomex
pyogg
requests
websocket-client
zeroconf
];
pythonRelaxDeps = [
"protobuf"
"pyogg"
"requests"
"zeroconf"
];
# Doesn't include any tests
doCheck = false;
pythonImportsCheck = [
"librespot"
];
meta = with lib; {
description = "Open Source Spotify Client";
homepage = "https://github.com/kokarare1212/librespot-python";
license = licenses.asl20;
maintainers = with maintainers; [ onny ];
};
}

View file

@ -0,0 +1,41 @@
{ lib
, buildPythonPackage
, fetchPypi
, mutagen
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "music-tag";
version = "0.4.3";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-Cqtubu2o3w9TFuwtIZC9dFYbfgNWKrCRzo1Wh828//Y=";
};
propagatedBuildInputs = [
mutagen
];
checkInputs = [
pytestCheckHook
];
pytestFlagsArray = [ "test" ];
# Tests fail: ModuleNotFoundError: No module named '_test_common'
doCheck = false;
pythonImportsCheck = [
"music_tag"
];
meta = with lib; {
description = "Simple interface to edit audio file metadata";
homepage = "https://github.com/KristoforMaynard/music-tag";
license = licenses.mit;
maintainers = with maintainers; [ onny ];
};
}

View file

@ -11141,6 +11141,8 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) Security;
};
onthespot = libsForQt5.callPackage ../applications/misc/onthespot { };
opencorsairlink = callPackage ../tools/misc/opencorsairlink { };
openfpgaloader = callPackage ../development/embedded/fpga/openfpgaloader { };

View file

@ -5898,6 +5898,8 @@ self: super: with self; {
(p: p.py)
];
librespot = callPackage ../development/python-modules/librespot { };
libretranslate = callPackage ../development/python-modules/libretranslate { };
librosa = callPackage ../development/python-modules/librosa { };
@ -6756,6 +6758,8 @@ self: super: with self; {
musicbrainzngs = callPackage ../development/python-modules/musicbrainzngs { };
music-tag = callPackage ../development/python-modules/music-tag { };
mutag = callPackage ../development/python-modules/mutag { };
mutagen = callPackage ../development/python-modules/mutagen { };