Skip to content

Commit

Permalink
fichub-cli: init at 0.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Samasaur1 committed Jul 16, 2024
1 parent f929333 commit 6c74bba
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions pkgs/by-name/fi/fichub-cli/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{ lib, python3Packages, fetchPypi }:

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

src = fetchPypi {
# Before version 0.10.0, we could `inherit pname` because the PyPI files were under the URL with dashes
# From version 0.10.0 onward, the files are only accessible via the URL with underscores
pname = "fichub_cli";
inherit version;
hash = "sha256-/klPXxUFiva87LMbHU4UstnkFCLEYCiugSK4qGtHkL0=";
};

build-system = with python3Packages; [
setuptools
];

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

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)
'';

# These all attempt to access the network
disabledTests = [
"test_cli_url"
"test_cli_list_url"
"test_cli_infile"
];

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;
maintainers = [ lib.maintainers.samasaur ];
};
}

0 comments on commit 6c74bba

Please sign in to comment.