-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdefault.nix
More file actions
52 lines (46 loc) · 1.21 KB
/
Copy pathdefault.nix
File metadata and controls
52 lines (46 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{
pkgs ? import <nixpkgs> {},
python ? (
if pkgs ? python3_13
then pkgs.python3_13
else pkgs.python3
),
}: let
lib = pkgs.lib;
pypkgs = python.pkgs;
# Override typer to a version compatible with pyproject (>=0.19.1)
typer_019 = pypkgs.typer.overrideAttrs (old: rec {
version = "0.19.1";
src = pkgs.fetchPypi {
pname = "typer";
inherit version;
sha256 = "sha256-y4gUM6SxXazIdbsFg9GmHnhJeAZ0H5q6eSq8qzkMA+Y=";
};
});
in
pypkgs.buildPythonPackage rec {
pname = "niri-companion";
version = "2.4.0";
# PEP 517/518 build using setuptools declared in pyproject.toml
pyproject = true;
src = ./.;
build-system = [pypkgs.setuptools];
# Runtime dependencies from pyproject.toml
dependencies = [
pypkgs.pydantic
pypkgs.rich
pypkgs."tomli-w"
typer_019
pypkgs.watchdog
];
# Run tests with pytest
nativeCheckInputs = [pypkgs.pytestCheckHook];
doCheck = false;
# Optional: only import safe submodules during import checks
# to avoid triggering config load at import time.
pythonImportsCheck = [
"companion.utils.general"
"companion.utils.genconfig"
"companion.models.config"
];
}