nixpkgs/pkgs/tools/audio/google-music-scripts/default.nix

60 lines
1.2 KiB
Nix
Raw Normal View History

2019-01-11 00:15:00 +01:00
{ lib, python3 }:
2020-07-04 16:42:19 +02:00
let
py = python3.override {
packageOverrides = self: super: {
loguru = super.loguru.overridePythonAttrs (oldAttrs: rec {
version = "0.4.0";
src = oldAttrs.src.override {
inherit version;
sha256 = "0j47cg3gi8in4z6z4w3by6x02mpkkfl78gr85xjn5rg0nxiz7pfm";
};
});
};
};
in
with py.pkgs;
2020-04-02 09:26:24 +02:00
buildPythonApplication rec {
2019-01-11 00:15:00 +01:00
pname = "google-music-scripts";
2020-07-04 16:42:19 +02:00
version = "4.5.0";
2019-01-11 00:15:00 +01:00
2020-04-02 09:26:24 +02:00
src = fetchPypi {
2019-01-11 00:15:00 +01:00
inherit pname version;
2020-07-04 16:42:19 +02:00
sha256 = "0apwgj86whrc077dfymvyb4qwj19bawyrx49g4kg364895v0rbbq";
2019-01-11 00:15:00 +01:00
};
2021-01-10 15:56:55 +01:00
# there are already later releases present
2020-04-02 09:26:24 +02:00
postPatch = ''
substituteInPlace setup.py \
2020-07-04 16:42:19 +02:00
--replace "tomlkit>=0.5,<0.6" "tomlkit" \
2021-01-10 15:56:55 +01:00
--replace "attrs>=18.2,<19.4" "attrs"
2020-04-02 09:26:24 +02:00
'';
2019-07-03 04:57:58 +02:00
2020-04-02 09:26:24 +02:00
propagatedBuildInputs = [
2019-01-11 00:15:00 +01:00
appdirs
audio-metadata
google-music
2019-03-15 19:53:14 +01:00
google-music-proto
2019-01-11 00:15:00 +01:00
google-music-utils
2019-07-03 04:57:58 +02:00
loguru
2019-03-15 19:53:14 +01:00
pendulum
natsort
2019-01-11 00:15:00 +01:00
tomlkit
];
# No tests
2020-04-02 09:26:24 +02:00
checkPhase = ''
$out/bin/gms --help >/dev/null
'';
2019-01-11 00:15:00 +01:00
meta = with lib; {
2020-04-02 09:26:24 +02:00
homepage = "https://github.com/thebigmunch/google-music-scripts";
2019-01-11 00:15:00 +01:00
description = "A CLI utility for interacting with Google Music";
license = licenses.mit;
maintainers = with maintainers; [ jakewaksbaum ];
};
}