From 91575e3ab2dd31e974f1d9f37f492f0d04dfc5f3 Mon Sep 17 00:00:00 2001 From: Richie Cahill Date: Sun, 12 Jul 2026 17:10:47 -0400 Subject: [PATCH] feat(ebook-search): update test workflow to use nix for dependency management --- .github/workflows/test_ebook_search.yml | 4 ++-- shell.nix | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_ebook_search.yml b/.github/workflows/test_ebook_search.yml index 0e43e3e..823adfa 100644 --- a/.github/workflows/test_ebook_search.yml +++ b/.github/workflows/test_ebook_search.yml @@ -19,6 +19,6 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install dependencies - run: uv sync --locked --project python/ebook_search/docker + run: nix develop .#devShells.x86_64-linux.ebook-search -c uv sync --locked --project python/ebook_search/docker - name: Run ebook search tests - run: uv run --project python/ebook_search/docker --no-sync pytest tests/ebook_search --override-ini addopts="-n auto -ra" + run: nix develop .#devShells.x86_64-linux.ebook-search -c uv run --project python/ebook_search/docker --no-sync pytest tests/ebook_search --override-ini addopts="-n auto -ra" diff --git a/shell.nix b/shell.nix index b8a7742..13d40cb 100644 --- a/shell.nix +++ b/shell.nix @@ -3,6 +3,20 @@ ... }: { + # For running the uv-managed ebook-search venv outside the container: + # PyPI manylinux wheels (numpy via bm25s) expect libstdc++.so.6 on the + # loader path, which NixOS does not provide globally. + ebook-search = pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + my_python + uv + ]; + LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [ + pkgs.stdenv.cc.cc.lib + pkgs.zlib + ]; + }; + default = pkgs.mkShell { NIX_CONFIG = "extra-experimental-features = nix-command flakes ca-derivations"; nativeBuildInputs = with pkgs; [