Files
Benoit de Chezelles 956d905835 nix: Simplify flake.nix; update Nix-related workflows (#7854)
- ci/cd: Update nix-related workflows

- nix: Simplify flake.nix

  With recent enough Nix we can now remove the explicit submodules
  dependencies and let Nix do the heavy lifting.
  Improve Nix code to match modern Nix standards (finalAttrs).

- Includes #4986 with comments, for nicer package version
- Lock actions to a major branch, at least
- Various tweaks and readability improvements
- Only push built result to Cachix if workflow triggered
  by schedule or manual workflow_dispatch event
2026-06-15 20:47:52 +02:00

42 lines
961 B
YAML

name: Nix / Build
on:
pull_request:
branches:
- main
paths:
- '**/*.rs'
- '.github/workflows/nix.yml'
- 'nix/**'
workflow_dispatch:
push:
branches:
- main
paths:
- '**/*.rs'
- '.github/workflows/nix.yml'
- 'nix/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install nix
uses: DeterminateSystems/determinate-nix-action@v3.21.1
- name: Cache build artifacts
uses: DeterminateSystems/flakehub-cache-action@v3
- name: Check flake inputs
# note: waiting for a release with node24 upgrade
# see: https://github.com/DeterminateSystems/flake-checker-action/pull/110
uses: DeterminateSystems/flake-checker-action@main
with:
flake-lock-path: ./nix/flake.lock
ignore-missing-flake-lock: false
- name: Build default package
run: nix build ./nix