tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
mopidy-youtube: enable tests
Fabian Affolter
4 years ago
dabafc8a
807370df
+39
-12
1 changed file
expand all
collapse all
unified
split
pkgs
applications
audio
mopidy
youtube.nix
+39
-12
pkgs/applications/audio/mopidy/youtube.nix
···
1
1
-
{ lib, python3Packages, mopidy }:
1
1
+
{ lib
2
2
+
, fetchFromGitHub
3
3
+
, python3
4
4
+
, mopidy
5
5
+
}:
2
6
3
3
-
python3Packages.buildPythonApplication rec {
7
7
+
python3.pkgs.buildPythonApplication rec {
4
8
pname = "mopidy-youtube";
5
9
version = "3.4";
6
10
7
7
-
src = python3Packages.fetchPypi {
8
8
-
inherit version;
9
9
-
pname = "Mopidy-YouTube";
10
10
-
sha256 = "sha256-996MNByMcKq1woDGK6jsmAHS9TOoBrwSGgPmcShvTRw=";
11
11
-
};
11
11
+
disabled = python3.pythonOlder "3.7";
12
12
13
13
-
postPatch = "sed s/bs4/beautifulsoup4/ -i setup.cfg";
13
13
+
src = fetchFromGitHub {
14
14
+
owner = "natumbri";
15
15
+
repo = pname;
16
16
+
rev = "v${version}";
17
17
+
sha256 = "0lm6nn926qkrwzvj64yracdixfrnv5zk243msjskrnlzkhgk01rk";
18
18
+
};
14
19
15
15
-
propagatedBuildInputs = with python3Packages; [
20
20
+
propagatedBuildInputs = with python3.pkgs; [
16
21
beautifulsoup4
17
22
cachetools
23
23
+
pykka
24
24
+
requests
18
25
youtube-dl
19
26
ytmusicapi
20
20
-
] ++ [ mopidy ];
27
27
+
] ++ [
28
28
+
mopidy
29
29
+
];
30
30
+
31
31
+
checkInputs = with python3.pkgs; [
32
32
+
vcrpy
33
33
+
pytestCheckHook
34
34
+
];
35
35
+
36
36
+
disabledTests = [
37
37
+
# Test requires a YouTube API key
38
38
+
"test_get_default_config"
39
39
+
];
40
40
+
41
41
+
disabledTestPaths = [
42
42
+
# Fails with an import error
43
43
+
"tests/test_backend.py"
44
44
+
];
21
45
22
22
-
doCheck = false;
46
46
+
pythonImportsCheck = [
47
47
+
"mopidy_youtube"
48
48
+
];
23
49
24
50
meta = with lib; {
25
51
description = "Mopidy extension for playing music from YouTube";
52
52
+
homepage = "https://github.com/natumbri/mopidy-youtube";
26
53
license = licenses.asl20;
27
27
-
maintainers = [ maintainers.spwhitt ];
54
54
+
maintainers = with maintainers; [ spwhitt ];
28
55
};
29
56
}