nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 57 lines 1.1 kB view raw
1{ lib 2, stdenv 3, buildPythonPackage 4, dbus-python 5, fetchFromGitHub 6, flask 7, flask-cors 8, poetry-core 9, pythonOlder 10, requests 11}: 12 13buildPythonPackage rec { 14 pname = "swspotify"; 15 version = "1.2.3"; 16 format = "pyproject"; 17 18 disabled = pythonOlder "3.6"; 19 20 src = fetchFromGitHub { 21 owner = "SwagLyrics"; 22 repo = "SwSpotify"; 23 rev = "v${version}"; 24 hash = "sha256-xGLvc154xnje45Akf7H1qqQRUc03gGVt8AhGlkcP3kY="; 25 }; 26 27 nativeBuildInputs = [ 28 poetry-core 29 ]; 30 31 propagatedBuildInputs = [ 32 dbus-python 33 flask 34 flask-cors 35 requests 36 ]; 37 38 postPatch = '' 39 # Detection of the platform doesn't always works with 1.2.3 40 substituteInPlace pyproject.toml \ 41 --replace 'dbus-python = {version = "^1.2.16", platform = "linux"}' "" 42 ''; 43 44 # Tests want to use Dbus 45 doCheck = false; 46 47 pythonImportsCheck = [ 48 "SwSpotify" 49 ]; 50 51 meta = with lib; { 52 description = "Library to get the currently playing song and artist from Spotify"; 53 homepage = "https://github.com/SwagLyrics/SwSpotify"; 54 license = licenses.mit; 55 maintainers = with maintainers; [ siraben ]; 56 }; 57}