From 8d830311ecd536e0c0b60bb39b4dc4b669ad8993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Sat, 24 Oct 2020 14:14:26 +0200 Subject: [PATCH] spotify-cli-linux: init at 1.6.0 --- .../audio/spotify-cli-linux/default.nix | 29 +++++++++++++++++++ .../python-modules/lyricwikia/default.nix | 3 ++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 34 insertions(+) create mode 100644 pkgs/applications/audio/spotify-cli-linux/default.nix 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 index 35c4b8439b62..4e58c6a7d676 100644 --- a/pkgs/development/python-modules/lyricwikia/default.nix +++ b/pkgs/development/python-modules/lyricwikia/default.nix @@ -2,14 +2,17 @@ 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 ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 26f04573ddef..1efb266f85b0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21210,6 +21210,8 @@ in 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;