From b2c3b3840fb6e0b57ee00c4175812e3b116f1594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 27 Oct 2023 14:37:43 +0200 Subject: [PATCH] move breakpoint checks out of default build this allows to debug builds with breakpoints --- pkgs/clan-cli/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/clan-cli/default.nix b/pkgs/clan-cli/default.nix index 8c4ca0a32..9a4f217e2 100644 --- a/pkgs/clan-cli/default.nix +++ b/pkgs/clan-cli/default.nix @@ -132,6 +132,14 @@ python3.pkgs.buildPythonApplication { ${checkPython}/bin/python -m pytest -m "not impure" -s ./tests touch $out ''; + check-for-breakpoints = runCommand "breakpoints" { } '' + if grep --include \*.py -Rq "breakpoint()" ${source}; then + echo "breakpoint() found in ${source}:" + grep --include \*.py -Rn "breakpoint()" ${source} + exit 1 + fi + touch $out + ''; }; passthru.clan-openapi = runCommand "clan-openapi" { } '' cp -r ${source} ./src @@ -167,11 +175,6 @@ python3.pkgs.buildPythonApplication { ''; checkPhase = '' PYTHONPATH= $out/bin/clan --help - if grep --include \*.py -Rq "breakpoint()" $out; then - echo "breakpoint() found in $out:" - grep --include \*.py -Rn "breakpoint()" $out - exit 1 - fi ''; meta.mainProgram = "clan"; desktopItems = [