-
-
Notifications
You must be signed in to change notification settings - Fork 376
Expand file tree
/
Copy pathdevenv.nix
More file actions
39 lines (32 loc) · 917 Bytes
/
devenv.nix
File metadata and controls
39 lines (32 loc) · 917 Bytes
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
{ pkgs, lib, config, inputs, ... }:
let
# Single source of truth for Python version — see .python-version at repo root.
pythonVersion = lib.strings.removeSuffix "\n" (builtins.readFile ./.python-version);
in
{
# https://devenv.sh/basics/
env.GREET = "devenv";
# https://devenv.sh/packages/
packages = [ pkgs.git pkgs.ffmpeg_7 ];
# https://devenv.sh/languages/
languages.python = {
enable = true;
uv.enable = true;
version = lib.versions.majorMinor pythonVersion;
};
# https://devenv.sh/scripts/
scripts.install-python-venv.exec = ''
uv sync --frozen --all-extras
'';
# https://devenv.sh/basics/
enterShell = ''
install-python-venv
'';
# https://devenv.sh/tests/
enterTest = ''
echo "Running tests"
'';
# https://devenv.sh/git-hooks/
# NOT ENABLED TO NOT CONFLICT WITH EXISTING PRE-COMMIT CONFIGS
# git-hooks.hooks.shellcheck.enable = true;
}