From 2baef247b34d06b9d1ee8d337c441ccd52f118c7 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 14 Aug 2026 23:19:30 +0000 Subject: [PATCH] python3Packages.qcodes-contrib-drivers: cleanup, fix --- .../qcodes-contrib-drivers/default.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/qcodes-contrib-drivers/default.nix b/pkgs/development/python-modules/qcodes-contrib-drivers/default.nix index a277296bc61e..b33408231eef 100644 --- a/pkgs/development/python-modules/qcodes-contrib-drivers/default.nix +++ b/pkgs/development/python-modules/qcodes-contrib-drivers/default.nix @@ -13,8 +13,8 @@ cffi, packaging, pandas, - qcodes, python-dotenv, + qcodes, # tests pytest-mock, @@ -27,6 +27,7 @@ buildPythonPackage (finalAttrs: { pname = "qcodes-contrib-drivers"; version = "0.25.0"; pyproject = true; + __structuredAttrs = true; src = fetchFromGitHub { owner = "QCoDeS"; @@ -35,6 +36,15 @@ buildPythonPackage (finalAttrs: { hash = "sha256-4ZVNd1cHqM3tuGcOxlBN8WX9i9u3XFlJ0zr06n7zpmI="; }; + postPatch = + # versioningit derives the version from git, which is unavailable in the sandbox + '' + substituteInPlace pyproject.toml \ + --replace-fail \ + 'default-version = "0.0"' \ + 'default-version = "${finalAttrs.version}"' + ''; + build-system = [ setuptools versioningit @@ -45,8 +55,9 @@ buildPythonPackage (finalAttrs: { cffi packaging pandas - qcodes python-dotenv + qcodes + versioningit ]; nativeCheckInputs = [