From 6fd3323d26b05b88fa811b0d0540534addf23856 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Mon, 29 Oct 2018 17:23:10 -0400 Subject: [PATCH] pythonPackages.tvnamer: refactor move to python-modules --- .../python-modules/tvnamer/default.nix | 30 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 23 +------------- 2 files changed, 31 insertions(+), 22 deletions(-) create mode 100644 pkgs/development/python-modules/tvnamer/default.nix diff --git a/pkgs/development/python-modules/tvnamer/default.nix b/pkgs/development/python-modules/tvnamer/default.nix new file mode 100644 index 000000000000..172c44239203 --- /dev/null +++ b/pkgs/development/python-modules/tvnamer/default.nix @@ -0,0 +1,30 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, pytest +, tvdb_api +}: + +buildPythonPackage rec { + pname = "tvnamer"; + version = "2.4"; + + src = fetchPypi { + inherit pname version; + sha256 = "10iizmwna2xpyc2694hsrvny68y3bdq576p8kxsvg5gj2spnsxav"; + }; + + buildInputs = [ pytest ]; + propagatedBuildInputs = [ tvdb_api ]; + + # a ton of tests fail with: IOError: tvnamer/main.py could not be found in . or .. + doCheck = false; + + meta = with stdenv.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/python-packages.nix b/pkgs/top-level/python-packages.nix index 5c68310b67c9..057d74dc65eb 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4595,28 +4595,7 @@ in { tvdb_api = callPackage ../development/python-modules/tvdb_api { }; - tvnamer = buildPythonPackage rec { - name = "tvnamer-${version}"; - version = "2.4"; - - src = pkgs.fetchurl { - url = "mirror://pypi/t/tvnamer/${name}.tar.gz"; - sha256 = "10iizmwna2xpyc2694hsrvny68y3bdq576p8kxsvg5gj2spnsxav"; - }; - - buildInputs = with self; [ pytest ]; - propagatedBuildInputs = with self; [ tvdb_api ]; - - # a ton of tests fail with: IOError: tvnamer/main.py could not be found in . or .. - doCheck = false; - - meta = { - 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 ]; - }; - }; + tvnamer = callPackage ../development/python-modules/tvnamer { }; threadpool = buildPythonPackage rec { name = "threadpool-${version}";