-
-
Notifications
You must be signed in to change notification settings - Fork 14k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #303771 from TheRealKeto/init/castero
castero: init at 0.9.5
- Loading branch information
Showing
1 changed file
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ]; | ||
}; | ||
} |