diff options
author | Keto <therealketo@gmail.com> | 2024-04-16 18:43:00 -0400 |
---|---|---|
committer | Keto <therealketo@gmail.com> | 2024-04-16 18:43:00 -0400 |
commit | 87ef9f4b15980d134d5dbb4403ab91d80f1ae140 (patch) | |
tree | 8d0770e2c4bbd98361e654d42c7708591ca3f419 /pkgs/by-name/ca/castero | |
parent | 0c26c1a03c2c264983a76472d771bfdfe5b104ee (diff) |
castero: init at 0.9.5
Diffstat (limited to 'pkgs/by-name/ca/castero')
-rw-r--r-- | pkgs/by-name/ca/castero/package.nix | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/pkgs/by-name/ca/castero/package.nix b/pkgs/by-name/ca/castero/package.nix new file mode 100644 index 0000000000000..6359c5c69536c --- /dev/null +++ b/pkgs/by-name/ca/castero/package.nix @@ -0,0 +1,67 @@ +{ lib +, fetchFromGitHub +, python3 +}: + +python3.pkgs.buildPythonApplication rec { + pname = "castero"; + version = "0.9.5"; + pyproject = true; + + src = fetchFromGitHub { + owner = "xgi"; + repo = "castero"; + rev = "v${version}"; + hash = "sha256-6/7oCKBMEcQeJ8PaFP15Xef9sQRYCpigtzINv2M6GUY="; + }; + + nativeBuildInputs = with python3.pkgs; [ + setuptools + wheel + ]; + + propagatedBuildInputs = with python3.pkgs; [ + requests + grequests + cjkwrap + pytz + beautifulsoup4 + lxml + mpv + python-vlc + ]; + + nativeCheckInputs = with python3.pkgs; [ + pytestCheckHook + ]; + + pytestFlagsArray = [ + "tests" + ]; + + disabledTests = [ "test_datafile_download" ]; + + pythonImportCheck = [ + "castero" + ]; + + # Resolve configuration tests, which access $HOME + preCheck = '' + export HOME=$(mktemp -d) + ''; + + # Satisfy the python-mpv depedency, which is mpv within NixOS + postPatch = '' + substituteInPlace setup.py --replace-fail "python-mpv" "mpv" + ''; + + # VLC currently doesn't support Darwin on NixOS + meta = with lib; { + mainProgram = "castero"; + description = "TUI podcast client for the terminal"; + homepage = "https://github.com/xgi/castero"; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ keto ]; + }; +} |