-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevenv.nix
More file actions
43 lines (36 loc) · 1.13 KB
/
devenv.nix
File metadata and controls
43 lines (36 loc) · 1.13 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
{ pkgs, ... }:
{
name = "ruff-qf";
# https://devenv.sh/packages/
packages = [ pkgs.git ];
# https://devenv.sh/languages/
languages.python = {
enable = true;
package = pkgs.python312Full;
poetry = {
enable = true;
activate.enable = true;
install = {
enable = true;
allGroups = true;
allExtras = true;
};
};
};
# https://devenv.sh/scripts/
scripts.qf.exec = "poetry run ruff-quickfix";
scripts.test.exec = "poetry run pytest";
scripts.full_test.exec = "poetry run tox run";
scripts.build.exec = "poetry build";
# https://devenv.sh/outputs/
outputs = {
ruff-quickfix = pkgs.callPackage ./. {};
};
# NOTE: handle pre-commit outside of devenv. It seems to assume
# everybody would be using devenv and thus it's safe to _not_ commit
# the `.pre-commit-config.yaml` file. In my opinion this is counter to
# the entire draw of pre-commit: developers can easily install the
# same git hooks even if they are using different tools or flows
enterShell = "poetry run pre-commit install";
# See full reference at https://devenv.sh/reference/options/
}