From b5cf7dff7b8118e11c18c8d10a4b569b695d044f Mon Sep 17 00:00:00 2001 From: Jade Lovelace Date: Thu, 21 Aug 2025 19:10:17 -0700 Subject: [PATCH] package: fix running pytest in a dev shell I have no idea how seemingly I am the only one hitting this, but either way, this fixes it. Fixes: https://git.lix.systems/lix-project/lix/issues/964 Workaround-For: https://github.com/NixOS/nixpkgs/pull/435749 Change-Id: If2a7ad89f98f0054928868eabb62b35c2df28e6e --- package.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/package.nix b/package.nix index a2dc3757f..eb0e5c602 100644 --- a/package.nix +++ b/package.nix @@ -140,6 +140,13 @@ let # This is for sys/sdt.h dtrace-headers = if withDtrace then libsystemtap else null; + # FIXME(jade): can be removed once our nixpkgs has https://github.com/NixOS/nixpkgs/pull/435749 (probably 25.11?) + dontWrapPython = + drv: + drv.overridePythonAttrs (old: { + dontWrapPythonPrograms = true; + }); + aws-sdk-cpp-nix = if aws-sdk-cpp == null then null @@ -211,7 +218,7 @@ stdenv.mkDerivation (finalAttrs: { p.pycapnp ] ++ lib.optionals finalAttrs.doCheck [ - p.pytest + (dontWrapPython p.pytest) p.pytest-xdist p.ruff p.aiohttp @@ -526,7 +533,7 @@ stdenv.mkDerivation (finalAttrs: { p: [ # FIXME: these have to be added twice due to the nix shell using a # wrapped python instead of build inputs for its python inputs - p.pytest + (dontWrapPython p.pytest) p.pytest-xdist p.ruff p.aiohttp