From 2d2f5f1f31193880a1019265ba340ae57caf0bb7 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 27 Sep 2025 14:15:36 +0200 Subject: [PATCH] python313Packages.libbs: add binaries for tests --- .../python-modules/libbs/default.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pkgs/development/python-modules/libbs/default.nix b/pkgs/development/python-modules/libbs/default.nix index b69b2c3ddde6..96eed62a0ebe 100644 --- a/pkgs/development/python-modules/libbs/default.nix +++ b/pkgs/development/python-modules/libbs/default.nix @@ -7,6 +7,7 @@ jfx-bridge, networkx, platformdirs, + ply, prompt-toolkit, psutil, pycparser, @@ -18,6 +19,15 @@ writableTmpDirAsHomeHook, }: +let + # Binary files from https://github.com/binsync/bs-artifacts (only used for testing and only here) + binaries = fetchFromGitHub { + owner = "binsync"; + repo = "bs-artifacts"; + rev = "514c2d6ef1875435c9d137bb5d99b6fc74063817"; + hash = "sha256-P7+BTJgdC9W8cC/7xQduFYllF+0ds1dSlm59/BFvZ2g="; + }; +in buildPythonPackage rec { pname = "libbs"; version = "2.15.4"; @@ -38,6 +48,7 @@ buildPythonPackage rec { jfx-bridge networkx platformdirs + ply prompt-toolkit psutil pycparser @@ -51,6 +62,14 @@ buildPythonPackage rec { writableTmpDirAsHomeHook ]; + # Place test binaries in place + preCheck = '' + export HOME=$TMPDIR + mkdir -p $HOME/bs-artifacts/binaries + cp -r ${binaries} $HOME/bs-artifacts/binaries + export TEST_BINARIES_DIR=$HOME/bs-artifacts/binaries + ''; + pythonImportsCheck = [ "libbs" ]; disabledTests = [