summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLassulus <github@lassul.us>2020-11-17 22:23:54 +0100
committerGitHub <noreply@github.com>2020-11-17 22:23:54 +0100
commitd93584cd1cb4b9d120615dea17ce993082bd3d4a (patch)
treefc8bcd0d8636f1a9ede7821551346c8dc6181dc9
parent48d4b84f40eadeec95bc5ab46a32323f913277d8 (diff)
parent8d830311ecd536e0c0b60bb39b4dc4b669ad8993 (diff)
Merge pull request #101547 from kmein/feature/spotify-cli-linux
spotify-cli-linux: init at 1.6.0
-rw-r--r--pkgs/applications/audio/spotify-cli-linux/default.nix29
-rw-r--r--pkgs/development/python-modules/lyricwikia/default.nix23
-rw-r--r--pkgs/top-level/all-packages.nix2
-rw-r--r--pkgs/top-level/python-packages.nix2
4 files changed, 56 insertions, 0 deletions
diff --git a/pkgs/applications/audio/spotify-cli-linux/default.nix b/pkgs/applications/audio/spotify-cli-linux/default.nix
new file mode 100644
index 000000000000..da41fb6b64ed
--- /dev/null
+++ b/pkgs/applications/audio/spotify-cli-linux/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, python3Packages, dbus }:
+python3Packages.buildPythonApplication rec {
+ pname = "spotify-cli-linux";
+ version = "1.6.0";
+
+ src = python3Packages.fetchPypi {
+ inherit pname version;
+ sha256 = "0slyc3jfrj3rwq8rv6p5aqkw487aw7a87kmf1fb6n4vnvcf08v7w";
+ };
+
+ preBuild = ''
+ substituteInPlace spotifycli/spotifycli.py \
+ --replace dbus-send ${dbus}/bin/dbus-send
+ '';
+
+ disabled = !python3Packages.isPy3k;
+ propagatedBuildInputs = with python3Packages; [ lyricwikia dbus-python ];
+
+ # upstream has no code tests, but uses its "tests" for linting and formatting checks
+ doCheck = false;
+
+ meta = with stdenv.lib; {
+ homepage = "https://pwittchen.github.io/spotify-cli-linux/";
+ maintainers = [ maintainers.kmein ];
+ description = "A command line interface to Spotify on Linux.";
+ license = licenses.gpl3;
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/development/python-modules/lyricwikia/default.nix b/pkgs/development/python-modules/lyricwikia/default.nix
new file mode 100644
index 000000000000..4e58c6a7d676
--- /dev/null
+++ b/pkgs/development/python-modules/lyricwikia/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchPypi, buildPythonPackage, pytestrunner, six, beautifulsoup4, requests, }:
+buildPythonPackage rec {
+ pname = "lyricwikia";
+ version = "0.1.11";
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "0l5lkvr3299x79i7skdiggp67rzgax3s00psd1zqkxfysq27jvc8";
+ };
+
+ buildInputs = [ pytestrunner ];
+ propagatedBuildInputs = [ six beautifulsoup4 requests ];
+ # upstream has no code tests
+ doCheck = false;
+
+ meta = with stdenv.lib; {
+ homepage = "https://github.com/enricobacis/lyricwikia";
+ maintainers = [ maintainers.kmein ];
+ description = "LyricWikia API for song lyrics";
+ license = licenses.mit;
+ platforms = platforms.all;
+ };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 96031ac0a88b..7429bbda5b40 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -21616,6 +21616,8 @@ julia_15 = callPackage ../development/compilers/julia/1.5.nix {
spectral = qt5.callPackage ../applications/networking/instant-messengers/spectral { };
+ spotify-cli-linux = callPackage ../applications/audio/spotify-cli-linux { };
+
spotifyd = callPackage ../applications/audio/spotifyd {
withALSA = stdenv.isLinux;
withPulseAudio = config.pulseaudio or stdenv.isLinux;
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 73d17cd89fd5..5e1e3618eb81 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -3576,6 +3576,8 @@ in {
lxml = callPackage ../development/python-modules/lxml { inherit (pkgs) libxml2 libxslt zlib; };
+ lyricwikia = callPackage ../development/python-modules/lyricwikia { };
+
lz4 = self.python-lz4; # alias 2018-12-05
lzstring = callPackage ../development/python-modules/lzstring { };