From 83d906581b81dc6b164435e7457ca47765693ae2 Mon Sep 17 00:00:00 2001 From: Harinn Date: Sun, 24 May 2026 18:58:48 +0700 Subject: [PATCH] python3Packages.obspec: fix pytest-mypy-plugins under sandbox --- pkgs/development/python-modules/obspec/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/python-modules/obspec/default.nix b/pkgs/development/python-modules/obspec/default.nix index a684b0e34537..c0017e5507fc 100644 --- a/pkgs/development/python-modules/obspec/default.nix +++ b/pkgs/development/python-modules/obspec/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchFromGitHub, + python, pytestCheckHook, # build system @@ -44,6 +45,11 @@ buildPythonPackage (finalAttrs: { pytest-mypy-plugins ]; + # expose the installed package so pytest-mypy-plugins' mypy subprocess can resolve `import obspec` + preCheck = '' + export MYPYPATH=$out/${python.sitePackages} + ''; + meta = { description = "Object storage interface definitions for Python"; homepage = "http://developmentseed.org/obspec/";