mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
mopidy-youtube: enable tests
This commit is contained in:
parent
807370df94
commit
dabafc8ac7
@ -1,29 +1,56 @@
|
||||
{ lib, python3Packages, mopidy }:
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, python3
|
||||
, mopidy
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "mopidy-youtube";
|
||||
version = "3.4";
|
||||
|
||||
src = python3Packages.fetchPypi {
|
||||
inherit version;
|
||||
pname = "Mopidy-YouTube";
|
||||
sha256 = "sha256-996MNByMcKq1woDGK6jsmAHS9TOoBrwSGgPmcShvTRw=";
|
||||
disabled = python3.pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "natumbri";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0lm6nn926qkrwzvj64yracdixfrnv5zk243msjskrnlzkhgk01rk";
|
||||
};
|
||||
|
||||
postPatch = "sed s/bs4/beautifulsoup4/ -i setup.cfg";
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
beautifulsoup4
|
||||
cachetools
|
||||
pykka
|
||||
requests
|
||||
youtube-dl
|
||||
ytmusicapi
|
||||
] ++ [ mopidy ];
|
||||
] ++ [
|
||||
mopidy
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
checkInputs = with python3.pkgs; [
|
||||
vcrpy
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# Test requires a YouTube API key
|
||||
"test_get_default_config"
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
# Fails with an import error
|
||||
"tests/test_backend.py"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"mopidy_youtube"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Mopidy extension for playing music from YouTube";
|
||||
homepage = "https://github.com/natumbri/mopidy-youtube";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.spwhitt ];
|
||||
maintainers = with maintainers; [ spwhitt ];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user