From 0b35b64e730fb0f1438eb8c4505ca5e5da91f33a Mon Sep 17 00:00:00 2001 From: Zexin Yuan Date: Sun, 6 Apr 2025 12:58:58 +0800 Subject: [PATCH 1/2] aider-chat: ignore dev versions in update script --- pkgs/development/python-modules/aider-chat/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/aider-chat/default.nix b/pkgs/development/python-modules/aider-chat/default.nix index eb275da05fd8..a75c32980109 100644 --- a/pkgs/development/python-modules/aider-chat/default.nix +++ b/pkgs/development/python-modules/aider-chat/default.nix @@ -367,7 +367,12 @@ let } ); - updateScript = nix-update-script { }; + updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "^v([0-9.]+)$" + ]; + }; }; meta = { From af8e89f687def3387d762faea61e125d1f649ed7 Mon Sep 17 00:00:00 2001 From: Zexin Yuan Date: Sun, 6 Apr 2025 12:59:44 +0800 Subject: [PATCH 2/2] aider-chat: delaying evaluation of optional conditionals --- .../python-modules/aider-chat/default.nix | 58 +++++++++---------- 1 file changed, 26 insertions(+), 32 deletions(-) diff --git a/pkgs/development/python-modules/aider-chat/default.nix b/pkgs/development/python-modules/aider-chat/default.nix index a75c32980109..7e1852916966 100644 --- a/pkgs/development/python-modules/aider-chat/default.nix +++ b/pkgs/development/python-modules/aider-chat/default.nix @@ -330,40 +330,34 @@ let propagatedBuildInputs ? [ ], ... }: - let - playwrightDeps = - if withPlaywright || withAll then aider-chat.optional-dependencies.playwright else [ ]; - browserDeps = if withBrowser || withAll then aider-chat.optional-dependencies.browser else [ ]; - helpDeps = if withHelp || withAll then aider-chat.optional-dependencies.help else [ ]; - bedrockDeps = if withBedrock || withAll then aider-chat.optional-dependencies.bedrock else [ ]; - playwrightInputs = if withPlaywright || withAll then [ playwright-driver.browsers ] else [ ]; - playwrightArgs = - if withPlaywright || withAll then - [ - "--set" - "PLAYWRIGHT_BROWSERS_PATH" - "${playwright-driver.browsers}" - "--set" - "PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS" - "true" - ] - else - [ ]; - helpArgs = - if withHelp || withAll then - [ - "--set" - "NLTK_DATA" - "${aider-nltk-data}" - ] - else - [ ]; - in { - dependencies = dependencies ++ playwrightDeps ++ browserDeps ++ helpDeps ++ bedrockDeps; - propagatedBuildInputs = propagatedBuildInputs ++ playwrightInputs; - makeWrapperArgs = makeWrapperArgs ++ playwrightArgs ++ helpArgs; + dependencies = + dependencies + ++ lib.optionals (withAll || withPlaywright) aider-chat.optional-dependencies.playwright + ++ lib.optionals (withAll || withBrowser) aider-chat.optional-dependencies.browser + ++ lib.optionals (withAll || withHelp) aider-chat.optional-dependencies.help + ++ lib.optionals (withAll || withBedrock) aider-chat.optional-dependencies.bedrock; + + propagatedBuildInputs = + propagatedBuildInputs + ++ lib.optionals (withAll || withPlaywright) [ playwright-driver.browsers ]; + + makeWrapperArgs = + makeWrapperArgs + ++ lib.optionals (withAll || withPlaywright) [ + "--set" + "PLAYWRIGHT_BROWSERS_PATH" + "${playwright-driver.browsers}" + "--set" + "PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS" + "true" + ] + ++ lib.optionals (withAll || withHelp) [ + "--set" + "NLTK_DATA" + "${aider-nltk-data}" + ]; } );