File tree Expand file tree Collapse file tree 3 files changed +213
-0
lines changed Expand file tree Collapse file tree 3 files changed +213
-0
lines changed Original file line number Diff line number Diff line change 6565 - name : Install dependencies
6666 run : uv sync --group doc
6767 - run : uv run sphinx-build doc build/sphinx/html
68+
69+ nix :
70+ runs-on : ubuntu-latest
71+ steps :
72+ - uses : actions/checkout@v4
73+ - uses : cachix/install-nix-action@v27
74+ with :
75+ github_access_token : ${{ secrets.GITHUB_TOKEN }}
76+ - run : nix build
77+ - run : nix flake check
Original file line number Diff line number Diff line change 1+ {
2+ inputs = {
3+ nixpkgs . url = "github:NixOS/nixpkgs/nixos-unstable" ;
4+ flake-utils . url = "github:numtide/flake-utils" ;
5+ pyproject-nix = {
6+ url = "github:pyproject-nix/pyproject.nix" ;
7+ inputs . nixpkgs . follows = "nixpkgs" ;
8+ } ;
9+ uv2nix = {
10+ url = "github:pyproject-nix/uv2nix" ;
11+ inputs . pyproject-nix . follows = "pyproject-nix" ;
12+ inputs . nixpkgs . follows = "nixpkgs" ;
13+ } ;
14+ pyproject-build-systems = {
15+ url = "github:pyproject-nix/build-system-pkgs" ;
16+ inputs . pyproject-nix . follows = "pyproject-nix" ;
17+ inputs . uv2nix . follows = "uv2nix" ;
18+ inputs . nixpkgs . follows = "nixpkgs" ;
19+ } ;
20+ } ;
21+
22+ outputs =
23+ {
24+ self ,
25+ nixpkgs ,
26+ flake-utils ,
27+ uv2nix ,
28+ pyproject-nix ,
29+ pyproject-build-systems ,
30+ ...
31+ } :
32+ flake-utils . lib . eachDefaultSystem (
33+ system :
34+ let
35+ inherit ( nixpkgs ) lib ;
36+
37+ workspace = uv2nix . lib . workspace . loadWorkspace { workspaceRoot = ./. ; } ;
38+
39+ overlay = workspace . mkPyprojectOverlay {
40+ sourcePreference = "wheel" ;
41+ } ;
42+
43+ pkgs = nixpkgs . legacyPackages . ${ system } ;
44+
45+ python = pkgs . python312 ;
46+
47+ pythonSet =
48+ ( pkgs . callPackage pyproject-nix . build . packages {
49+ inherit python ;
50+ } ) . overrideScope
51+ (
52+ lib . composeManyExtensions [
53+ pyproject-build-systems . overlays . default
54+ overlay
55+ ]
56+ ) ;
57+
58+ in
59+ {
60+ packages . default = pythonSet . mkVirtualEnv "scim-cli-env" workspace . deps . default ;
61+
62+ apps = {
63+ default = {
64+ type = "app" ;
65+ program = "${ self . packages . ${ system } . default } /bin/scim2" ;
66+ } ;
67+ } ;
68+ }
69+ ) ;
70+ }
You can’t perform that action at this time.
0 commit comments