From dc31e4e27e01188a24485567b8a593be80cdd590 Mon Sep 17 00:00:00 2001 From: Anatolii Prylutskyi Date: Wed, 15 Oct 2025 12:14:32 +0300 Subject: [PATCH] fix(nix): resolve build issues and add CI verification (#668) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ci: add Nix build verification to pytest workflow Add a verification step to the CI pipeline that validates the Nix package builds successfully on each run. The step uses 'nix build --no-link' to verify the flake builds without creating artifacts. This provides early detection of Nix packaging issues with minimal overhead, reusing the existing Nix installation on Linux and macOS runners. 🤖 Generated with [Claude Code](https://claude.com/claude-code) via [Happy](https://happy.engineering) Co-Authored-By: Claude Co-Authored-By: Happy * fix(nix): add setuptools to ruamel-yaml-clib build dependencies Add pyproject override to ensure ruamel-yaml-clib has setuptools available during build. This fixes Nix build failures where the package requires setuptools but doesn't declare it as a native build input. 🤖 Generated with [Claude Code](https://claude.com/claude-code) via [Happy](https://happy.engineering) Co-Authored-By: Claude Co-Authored-By: Happy --------- Co-authored-by: Claude Co-authored-by: Happy --- .github/workflows/pytest.yml | 6 ++++++ flake.nix | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index e1db6ce2..e87eccfb 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -256,6 +256,12 @@ jobs: fi echo "$HOME/.nix-profile/bin" >> $GITHUB_PATH + - name: Verify Nix package build + if: runner.os != 'Windows' # Nix only supported on Linux/macOS + shell: bash + run: | + # Verify the flake builds successfully + nix build --no-link - name: Install uv shell: bash run: curl -LsSf https://astral.sh/uv/install.sh | sh diff --git a/flake.nix b/flake.nix index e92f1999..7529365b 100644 --- a/flake.nix +++ b/flake.nix @@ -50,7 +50,14 @@ sourcePreference = "wheel"; # or sourcePreference = "sdist"; }; - pyprojectOverrides = _final: _prev: {}; + pyprojectOverrides = final: prev: { + # Add setuptools for packages that need it during build + ruamel-yaml-clib = prev.ruamel-yaml-clib.overrideAttrs (old: { + nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ + final.setuptools + ]; + }); + }; python = pkgs.python311;