diff options
author | Peter Hoeg <peter@hoeg.com> | 2021-07-05 14:09:24 +0800 |
---|---|---|
committer | Peter Hoeg <peter@hoeg.com> | 2021-07-05 14:09:24 +0800 |
commit | dafd9282566f439fe27fcdaf061c0220bb48f0dd (patch) | |
tree | 26834b1cbdf3d3b0cd4ac3c239e13cdb78cfff13 /pkgs/tools/misc/tvnamer | |
parent | 20887e4bbfdae3aed6bfa1f53ddf138ee325515e (diff) |
tvnamer: move out of python3Packages
tvnamer is an application and should as such never have existed under python3Packages so move it out where it belongs. At the same time override tvdb_api to use an older requests-cache as it has a hard requirement on requests-cache < 0.6.
Diffstat (limited to 'pkgs/tools/misc/tvnamer')
-rw-r--r-- | pkgs/tools/misc/tvnamer/default.nix | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/tools/misc/tvnamer/default.nix b/pkgs/tools/misc/tvnamer/default.nix new file mode 100644 index 0000000000000..204914c280c64 --- /dev/null +++ b/pkgs/tools/misc/tvnamer/default.nix @@ -0,0 +1,47 @@ +{ lib +, python3 +}: + +let + python' = python3.override { + packageOverrides = self: super: rec { + # tvdb_api v3.1.0 has a hard requirement on requests-cache < 0.6 + requests-cache = super.requests-cache.overridePythonAttrs (super: rec { + version = "0.5.2"; + src = self.fetchPypi { + inherit (super) pname; + inherit version; + sha256 = "sha256-gTAjJpaGBF+OAeIonMHn6a5asi3dHihJqQk6s6tycOs="; + }; + + # too many changes have been made to requests-cache based on version 0.6 so + # simply disable tests + doCheck = false; + }); + }; + }; + + pypkgs = python'.pkgs; + +in +pypkgs.buildPythonApplication rec { + pname = "tvnamer"; + version = "3.0.4"; + + src = pypkgs.fetchPypi { + inherit pname version; + sha256 = "dc2ea8188df6ac56439343630466b874c57756dd0b2538dd8e7905048f425f04"; + }; + + propagatedBuildInputs = with pypkgs; [ tvdb_api ]; + + # no tests from pypi + doCheck = false; + + meta = with lib; { + description = "Automatic TV episode file renamer, uses data from thetvdb.com via tvdb_api."; + homepage = "https://github.com/dbr/tvnamer"; + license = licenses.unlicense; + maintainers = with maintainers; [ peterhoeg ]; + }; +} |