nixpkgs-suyu/pkgs/applications/audio/spotify-cli-linux/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

30 lines
899 B
Nix

{ lib, python3Packages, fetchPypi, dbus }:
python3Packages.buildPythonApplication rec {
pname = "spotify-cli-linux";
version = "1.8.2";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-XJMkiQR1FoeIPfAuJT22kfYJdc/ABuxExELh0EEev8k=";
};
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 lib; {
homepage = "https://pwittchen.github.io/spotify-cli-linux/";
maintainers = [ maintainers.kmein ];
description = "A command line interface to Spotify on Linux.";
mainProgram = "spotifycli";
license = licenses.gpl3;
platforms = platforms.linux;
};
}