diff --git a/pkgs/development/python-modules/tvnamer/default.nix b/pkgs/development/python-modules/tvnamer/default.nix deleted file mode 100644 index a9439d3e887..00000000000 --- a/pkgs/development/python-modules/tvnamer/default.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ lib -, buildPythonPackage -, fetchPypi -, pytest -, tvdb_api -}: - -buildPythonPackage rec { - pname = "tvnamer"; - version = "3.0.4"; - - src = fetchPypi { - inherit pname version; - sha256 = "dc2ea8188df6ac56439343630466b874c57756dd0b2538dd8e7905048f425f04"; - }; - - checkInputs = [ pytest ]; - propagatedBuildInputs = [ tvdb_api ]; - - # a ton of tests fail with: IOError: tvnamer/main.py could not be found in . or .. - 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 ]; - }; - -} diff --git a/pkgs/tools/misc/tvnamer/default.nix b/pkgs/tools/misc/tvnamer/default.nix new file mode 100644 index 00000000000..204914c280c --- /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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 09340a575f2..9160694c668 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1021,6 +1021,8 @@ in timedoctor = callPackage ../applications/office/timedoctor { }; + tvnamer = callPackage ../tools/misc/tvnamer { }; + twine = with python3Packages; toPythonApplication twine; wayst = callPackage ../applications/terminal-emulators/wayst { }; diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 124a9533dcc..ed772c1a1e8 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -58,5 +58,6 @@ mapAliases ({ smart_open = smart-open; # added 2021-03-14 smmap2 = throw "smmap2 has been deprecated, use smmap instead."; # added 2020-03-14 topydo = throw "python3Packages.topydo was moved to topydo"; # 2017-09-22 + tvnamer = throw "python3Packages.tvnamer was moved to tvnamer"; # 2021-07-05 websocket_client = websocket-client; }) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0e804a54133..ed43c69c373 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8733,8 +8733,6 @@ in { tvdb_api = callPackage ../development/python-modules/tvdb_api { }; - tvnamer = callPackage ../development/python-modules/tvnamer { }; - tweedledum = callPackage ../development/python-modules/tweedledum { }; tweepy = callPackage ../development/python-modules/tweepy { };