git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #144549 from siraben/swaglyrics-darwin

swaglyrics, python3Packages.swspotify: update and fix build on darwin

commit38f6e71ab59afc39fa97e8ac7ca35cb4c916f868 authorBen Siraphob <bensiraphob@gmail.com> dateWed 3 Nov 2021, 18:47 (5 years ago) parent457162504a1551
2 files changed+17−16
pkgs/development/python-modules/swspotify/default.nix+10−8 pkgs/tools/misc/swaglyrics/default.nix+7−8
pkgs/development/python-modules/swspotify/default.nix+10−8
@@ -1,29 +1,31 @@
1−{ lib, buildPythonPackage, fetchFromGitHub, requests, flask-cors, dbus-python, pytestCheckHook, mock, isPy27 }:
1+{ lib, stdenv, buildPythonPackage, fetchFromGitHub, poetry-core, requests
2+, pytestCheckHook, flask, flask-cors, dbus-python, mock, isPy27 }:
23
34buildPythonPackage rec {
45 pname = "SwSpotify";
5− version = "1.2.1";
6+ version = "1.2.2";
67 disabled = isPy27;
78
89 src = fetchFromGitHub {
910 owner = "SwagLyrics";
1011 repo = "SwSpotify";
1112 rev = "v${version}";
12− sha256 = "0jxcvy8lw8kpjbl4q6mi11164pvi0w9m9p76bxj2m7i7s5p4dxd4";
13+ sha256 = "sha256-571knnY8LegIbqyPeKUfl+d0suTWAMQHYLN7edKFNdI=";
1314 };
1415
1516 propagatedBuildInputs = [
16− requests flask-cors dbus-python
17+ requests flask flask-cors dbus-python
1718 ];
1819
1920 preConfigure = ''
2021 substituteInPlace setup.py \
21− --replace 'requests>=2.24.0' 'requests~=2.23' \
22− --replace 'flask-cors==3.0.8' 'flask-cors'
22+ --replace 'flask==2.0.1' 'flask'
2323 '';
2424
25+ doCheck = !stdenv.isDarwin;
26+
2527 checkPhase = ''
26− pytest tests/test_spotify.py::LinuxTests
28+ pytest tests/test_spotify.py::${if stdenv.isDarwin then "DarwinTests" else "LinuxTests"}
2729 '';
2830
2931 checkInputs = [ pytestCheckHook mock ];
@@ -35,6 +37,6 @@ buildPythonPackage rec {
3537 description = "Library to get the currently playing song and artist from Spotify";
3638 license = licenses.mit;
3739 maintainers = with maintainers; [ siraben ];
38− platforms = platforms.linux;
40+ platforms = platforms.unix;
3941 };
4042}
pkgs/tools/misc/swaglyrics/default.nix+7−8
@@ -2,13 +2,13 @@
22
33python3.pkgs.buildPythonApplication rec {
44 pname = "swaglyrics";
5− version = "1.2.2";
5+ version = "unstable-2021-06-17";
66
77 src = fetchFromGitHub {
88 owner = "SwagLyrics";
99 repo = "SwagLyrics-For-Spotify";
10− rev = "v${version}";
11− sha256 = "1dwj9fpyhqqpm2z3imp8hfribkzxya891shh77yg77rc2xghp7mh";
10+ rev = "99fe764a9e45cac6cb9fcdf724c7d2f8cb4524fb";
11+ sha256 = "sha256-O48T1WsUIVnNQb8gmzSkFFHTOiFOKVSAEYhF9zUqZz0=";
1212 };
1313
1414 propagatedBuildInputs = with python3.pkgs; [
@@ -17,10 +17,9 @@ python3.pkgs.buildPythonApplication rec {
1717
1818 preConfigure = ''
1919 substituteInPlace setup.py \
20− --replace 'requests>=2.24.0' 'requests~=2.23' \
21− --replace 'beautifulsoup4==4.9.1' 'beautifulsoup4~=4.9' \
22− --replace 'colorama==0.4.3' 'colorama~=0.4' \
23− --replace 'unidecode==1.1.1' 'unidecode~=1.2'
20+ --replace 'beautifulsoup4==4.9.3' 'beautifulsoup4>=4.9.3' \
21+ --replace 'unidecode==1.2.0' 'unidecode>=1.2.0' \
22+ --replace 'flask==2.0.1' 'flask>=2.0.1'
2423 '';
2524
2625 preBuild = "export HOME=$NIX_BUILD_TOP";
@@ -43,6 +42,6 @@ python3.pkgs.buildPythonApplication rec {
4342 homepage = "https://github.com/SwagLyrics/SwagLyrics-For-Spotify";
4443 license = licenses.mit;
4544 maintainers = with maintainers; [ siraben ];
46− platforms = platforms.linux;
45+ platforms = platforms.unix;
4746 };
4847}