nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 fetchPypi,
3 lib,
4 nb-cli,
5 python3,
6 testers,
7}:
8
9python3.pkgs.buildPythonApplication rec {
10 pname = "nb-cli";
11 version = "1.6.0";
12 pyproject = true;
13
14 src = fetchPypi {
15 pname = "nb_cli";
16 inherit version;
17 hash = "sha256-IbYyPZuhTkr4RInIR1lpMzl2+VYzu4IFQt2pOko92ZQ=";
18 };
19
20 pythonRelaxDeps = [
21 "watchfiles"
22 "noneprompt"
23 ];
24
25 build-system = [
26 python3.pkgs.babel
27 python3.pkgs.pdm-backend
28 ];
29
30 dependencies = with python3.pkgs; [
31 anyio
32 cashews
33 click
34 cookiecutter
35 httpx
36 importlib-metadata
37 jinja2
38 noneprompt
39 nonestorage
40 packaging
41 pydantic
42 pyfiglet
43 textual
44 tomlkit
45 typing-extensions
46 virtualenv
47 watchfiles
48 wcwidth
49 ];
50
51 # no test
52 doCheck = false;
53
54 pythonImportsCheck = [
55 "nb_cli"
56 "nb_cli.cli"
57 "nb_cli.compat"
58 "nb_cli.config"
59 "nb_cli.handlers"
60 "nb_cli.i18n"
61 "nb_cli.log"
62 ];
63
64 passthru.tests = {
65 version = testers.testVersion { package = nb-cli; };
66 };
67
68 meta = {
69 description = "CLI for nonebot2";
70 homepage = "https://cli.nonebot.dev";
71 changelog = "https://github.com/nonebot/nb-cli/releases/tag/v${version}";
72 license = lib.licenses.mit;
73 maintainers = with lib.maintainers; [ moraxyc ];
74 mainProgram = "nb";
75 };
76}