-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathflake.nix
More file actions
43 lines (42 loc) · 949 Bytes
/
flake.nix
File metadata and controls
43 lines (42 loc) · 949 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
40
41
42
43
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs = inputs @ {
self,
nixpkgs,
flake-parts,
...
}:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["x86_64-linux"];
perSystem = {
pkgs,
lib,
...
}: let
python = pkgs.python3;
in {
devShells.default = pkgs.mkShell {
packages = [
pkgs.uv
pkgs.ruff
python
(pkgs.writeShellScriptBin "build" ''
git pull
mkdocs build -d /srv/blocket-api/
'')
];
shellHook = ''
uv venv
source .venv/bin/activate
uv pip sync requirements.txt
pre-commit install --overwrite
set -a
source .env 2> /dev/null
'';
};
};
};
}