2021-07-14 22:03:04 +00:00
|
|
|
{ lib
|
|
|
|
, python3
|
2023-07-15 17:15:38 +00:00
|
|
|
, fetchPypi
|
2021-07-14 22:03:04 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
python' = python3.override {
|
2023-02-22 10:55:15 +00:00
|
|
|
packageOverrides = final: prev: rec {
|
2021-07-14 22:03:04 +00:00
|
|
|
# tvdb_api v3.1.0 has a hard requirement on requests-cache < 0.6
|
2023-02-22 10:55:15 +00:00
|
|
|
requests-cache = prev.requests-cache.overridePythonAttrs (oldAttrs: rec {
|
2021-07-14 22:03:04 +00:00
|
|
|
version = "0.5.2";
|
2023-07-15 17:15:38 +00:00
|
|
|
src = fetchPypi {
|
2023-02-22 10:55:15 +00:00
|
|
|
inherit (oldAttrs) pname;
|
2021-07-14 22:03:04 +00:00
|
|
|
inherit version;
|
|
|
|
sha256 = "sha256-gTAjJpaGBF+OAeIonMHn6a5asi3dHihJqQk6s6tycOs=";
|
|
|
|
};
|
|
|
|
|
2023-02-22 10:55:15 +00:00
|
|
|
nativeBuildInputs = with final; [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
# 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";
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
src = fetchPypi {
|
2021-07-14 22:03:04 +00:00
|
|
|
inherit pname version;
|
|
|
|
sha256 = "dc2ea8188df6ac56439343630466b874c57756dd0b2538dd8e7905048f425f04";
|
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
propagatedBuildInputs = with pypkgs; [ tvdb-api ];
|
2021-07-14 22:03:04 +00:00
|
|
|
|
|
|
|
# no tests from pypi
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-01-13 08:15:51 +00:00
|
|
|
description = "Automatic TV episode file renamer, uses data from thetvdb.com via tvdb_api";
|
2021-07-14 22:03:04 +00:00
|
|
|
homepage = "https://github.com/dbr/tvnamer";
|
|
|
|
license = licenses.unlicense;
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "tvnamer";
|
2021-07-14 22:03:04 +00:00
|
|
|
};
|
|
|
|
}
|