From a21bd4bec0a3c12625685a7ca5075feb06fcb88f Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Thu, 26 Feb 2026 15:40:16 -0800 Subject: [PATCH] python3Packages.pycep-parser: fix build failure Failure: https://hydra.nixos.org/build/322187920 --- .../python-modules/pycep-parser/default.nix | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/pycep-parser/default.nix b/pkgs/development/python-modules/pycep-parser/default.nix index 429be94b3019..98e138573ee6 100644 --- a/pkgs/development/python-modules/pycep-parser/default.nix +++ b/pkgs/development/python-modules/pycep-parser/default.nix @@ -4,13 +4,13 @@ buildPythonPackage, fetchFromGitHub, lark, - poetry-core, pytestCheckHook, regex, typing-extensions, + uv-build, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "pycep-parser"; version = "0.7.0"; pyproject = true; @@ -18,13 +18,21 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "gruebel"; repo = "pycep"; - tag = version; + tag = finalAttrs.version; hash = "sha256-pEFgpLfGcJhUWfs/nG1r7GfIS045cfNh7MVQokluXmM="; }; - nativeBuildInputs = [ poetry-core ]; + build-system = [ uv-build ]; - propagatedBuildInputs = [ + # We can't use pythonRelaxDeps to relax the build-system + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "uv_build~=0.9.0" "uv_build" + ''; + + pythonRelaxDeps = [ "regex" ]; + + dependencies = [ lark regex typing-extensions @@ -40,8 +48,8 @@ buildPythonPackage rec { meta = { description = "Python based Bicep parser"; homepage = "https://github.com/gruebel/pycep"; - changelog = "https://github.com/gruebel/pycep/blob/${src.tag}/CHANGELOG.md"; + changelog = "https://github.com/gruebel/pycep/blob/${finalAttrs.src.tag}/CHANGELOG.md"; license = with lib.licenses; [ asl20 ]; maintainers = with lib.maintainers; [ fab ]; }; -} +})