Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fichub-cli: init at 0.10.3 #325173

Merged
merged 1 commit into from
Jul 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions pkgs/by-name/fi/fichub-cli/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{ lib, python3Packages, fetchPypi }:

python3Packages.buildPythonApplication rec {
pname = "fichub-cli";
version = "0.10.3";
pyproject = true;

src = fetchPypi {
pname = "fichub_cli";
inherit version;
hash = "sha256-MTExXpuCwi/IfNDUVLMcxfFRwHHNfGJerHkHnh6/hls=";
};

build-system = with python3Packages; [
setuptools
];

dependencies = with python3Packages; [
platformdirs
beautifulsoup4
click
click-plugins
colorama
loguru
requests
tqdm
typer
];

SuperSandro2000 marked this conversation as resolved.
Show resolved Hide resolved
pythonImportsCheck = [
"fichub_cli"
];

nativeCheckInputs = with python3Packages; [
pytestCheckHook
];

# The package tries to create a file under the home directory on import
preCheck = ''
export HOME=$(mktemp -d)
'';

pytestFlagsArray = [
# pytest exits with a code of 5 if no tests are selected.
# handle this specific case as not an error
"|| ([ $? = 5 ] || exit $?)"
];

disabledTestPaths = [
# Loading tests tries to download something from pypi.org
"tests/test_cli.py"
];

meta = {
description = "CLI for the fichub.net API";
changelog = "https://github.com/FicHub/fichub-cli/releases/tag/v${version}";
mainProgram = "fichub_cli";
homepage = "https://github.com/FicHub/fichub-cli";
license = lib.licenses.asl20;
Samasaur1 marked this conversation as resolved.
Show resolved Hide resolved
maintainers = [ lib.maintainers.samasaur ];
};
}