File tree Expand file tree Collapse file tree 6 files changed +136
-0
lines changed
Expand file tree Collapse file tree 6 files changed +136
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Upload
2+
3+ on :
4+ pull_request :
5+ push :
6+ branches :
7+ - master
8+
9+ permissions :
10+ contents : read
11+ pages : write
12+ id-token : write
13+
14+ jobs :
15+ build-pages :
16+ if : github.ref == 'refs/heads/master'
17+ runs-on : ubuntu-latest
18+ steps :
19+ - uses : cachix/install-nix-action@v30
20+ with :
21+ nix_path : nixpkgs=channel:nixos-unstable
22+ - uses : cachix/cachix-action@v15
23+ with :
24+ name : pyproject-nix
25+ authToken : ' ${{ secrets.CACHIX_AUTH_TOKEN }}'
26+ 27+ - name : Run build
28+ run : nix build -L -v
29+ - name : Upload artifact
30+ uses : actions/upload-pages-artifact@v3
31+ with :
32+ path : ./result
33+
34+ deploy-pages :
35+ if : github.ref == 'refs/heads/master'
36+ needs : build-pages
37+ environment :
38+ name : github-pages
39+ url : ${{ steps.deployment.outputs.page_url }}
40+ runs-on : ubuntu-latest
41+ steps :
42+ - name : Deploy to GitHub Pages
43+ id : deployment
44+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change 1+ {
2+ self ? ./. ,
3+ runCommand ,
4+ pandoc ,
5+ } :
6+ runCommand "pyproject-nix-website"
7+ {
8+ nativeBuildInputs = [
9+ pandoc
10+ ] ;
11+ }
12+ ''
13+ mkdir $out
14+ pandoc ${ self } /website.md > $out/index.html
15+ ''
Original file line number Diff line number Diff line change 1+ {
2+ inputs = {
3+ nixpkgs . url = "github:nixos/nixpkgs/nixos-unstable" ;
4+ } ;
5+
6+ outputs =
7+ {
8+ self ,
9+ nixpkgs ,
10+ ...
11+ } :
12+ let
13+ forAllSystems = lib . genAttrs lib . systems . flakeExposed ;
14+ inherit ( nixpkgs ) lib ;
15+
16+ in
17+ {
18+ devShells = forAllSystems (
19+ system :
20+ let
21+ pkgs = nixpkgs . legacyPackages . ${ system } ;
22+ in
23+ {
24+ default = pkgs . callPackage ./shell.nix { } ;
25+ }
26+ ) ;
27+
28+ packages = forAllSystems (
29+ system :
30+ let
31+ pkgs = nixpkgs . legacyPackages . ${ system } ;
32+ in
33+ {
34+ default = pkgs . callPackage ./. { inherit self ; } ;
35+ }
36+ ) ;
37+ } ;
38+ }
Original file line number Diff line number Diff line change 1+ {
2+ pkgs ? import <nixpkgs> { } ,
3+ } :
4+ pkgs . mkShell {
5+ packages = [
6+ pkgs . pandoc
7+ ] ;
8+ }
Original file line number Diff line number Diff line change 1+ # Pyproject.nix project documentation
2+
3+ - [ pyproject.nix] ( https://pyproject-nix.github.io/pyproject.nix/ )
4+ - [ uv2nix] ( https://pyproject-nix.github.io/uv2nix/ )
You can’t perform that action at this time.
0 commit comments