From a96bab416a39cead3d1ad43bba46273d643ed92a Mon Sep 17 00:00:00 2001 From: Jake Waksbaum Date: Tue, 2 Jul 2019 19:20:21 -0700 Subject: [PATCH 1/2] python3Packages.loguru: init at 0.3.0 --- .../python-modules/loguru/default.nix | 24 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/development/python-modules/loguru/default.nix diff --git a/pkgs/development/python-modules/loguru/default.nix b/pkgs/development/python-modules/loguru/default.nix new file mode 100644 index 000000000000..a0bc3a887459 --- /dev/null +++ b/pkgs/development/python-modules/loguru/default.nix @@ -0,0 +1,24 @@ +{ lib, buildPythonPackage, fetchPypi, isPy27, pytest, colorama }: + +buildPythonPackage rec { + pname = "loguru"; + version = "0.3.0"; + + disabled = isPy27; + src = fetchPypi { + inherit pname version; + sha256 = "1b2phizcx2wbdm5np0s16yd68fc0isqnm8qs6l9pmlrlyf9gm87j"; + }; + + checkInputs = [ pytest colorama ]; + checkPhase = '' + pytest -k 'not test_time_rotation_reopening' + ''; + + meta = with lib; { + homepage = https://github.com/Delgan/loguru; + description = "Python logging made (stupidly) simple"; + license = licenses.mit; + maintainers = with maintainers; [ jakewaksbaum ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 65cc544a37f9..44631c56edc8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -532,6 +532,8 @@ in { logster = callPackage ../development/python-modules/logster { }; + loguru = callPackage ../development/python-modules/loguru { }; + logzero = callPackage ../development/python-modules/logzero { }; macropy = callPackage ../development/python-modules/macropy { }; From 2e729e7f1fdd812062b323a0a069fc0531e5c594 Mon Sep 17 00:00:00 2001 From: Jake Waksbaum Date: Tue, 2 Jul 2019 19:57:58 -0700 Subject: [PATCH 2/2] google-music-scripts: fix build --- .../audio/google-music-scripts/default.nix | 5 +++-- .../audio/google-music-scripts/loguru.patch | 22 +++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 pkgs/tools/audio/google-music-scripts/loguru.patch diff --git a/pkgs/tools/audio/google-music-scripts/default.nix b/pkgs/tools/audio/google-music-scripts/default.nix index ba3437c08cdb..f7e96971ab19 100644 --- a/pkgs/tools/audio/google-music-scripts/default.nix +++ b/pkgs/tools/audio/google-music-scripts/default.nix @@ -9,13 +9,15 @@ python3.pkgs.buildPythonApplication rec { sha256 = "5b2e9fdde8781a6d226984f0b61add2415a3804123ceeecb20fcc8527de9389d"; }; + patches = [ ./loguru.patch ]; + propagatedBuildInputs = with python3.pkgs; [ appdirs audio-metadata google-music google-music-proto google-music-utils - #loguru + loguru pendulum natsort tomlkit @@ -29,6 +31,5 @@ python3.pkgs.buildPythonApplication rec { description = "A CLI utility for interacting with Google Music"; license = licenses.mit; maintainers = with maintainers; [ jakewaksbaum ]; - broken = true; # 2019-03-15, missing dependency loguru }; } diff --git a/pkgs/tools/audio/google-music-scripts/loguru.patch b/pkgs/tools/audio/google-music-scripts/loguru.patch new file mode 100644 index 000000000000..141ce044c431 --- /dev/null +++ b/pkgs/tools/audio/google-music-scripts/loguru.patch @@ -0,0 +1,22 @@ +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -24,7 +24,7 @@ audio-metadata = "^0.4" + google-music = "^3.0" + google-music-proto = "^2.4" + google-music-utils = "^2.1" +-loguru = "^0.2" ++loguru = "^0.3" + pendulum = "^2.0" + natsort = ">=5.0,<7.0" + tomlkit = "^0.5" +--- a/setup.py ++++ b/setup.py +@@ -16,7 +16,7 @@ install_requires = \ + 'google-music-proto>=2.4,<3.0', + 'google-music-utils>=2.1,<3.0', + 'google-music>=3.0,<4.0', +- 'loguru>=0.2,<0.3', ++ 'loguru>=0.3,<0.4', + 'natsort>=5.0,<7.0', + 'pendulum>=2.0,<3.0', + 'tomlkit>=0.5,<0.6']