Unverified Commit 62b6f9a5 authored by Michael Maurer's avatar Michael Maurer
Browse files

aider-chat: run nixfmt

parent e714b7ce
Loading
Loading
Loading
Loading
+38 −53
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  python312,
  fetchFromGitHub,
  gitMinimal,
  portaudio,
  playwright-driver,
}:
{ lib, stdenv, python312, fetchFromGitHub, gitMinimal, portaudio
, playwright-driver, }:

let
  python3 = python312.override {
@@ -126,7 +119,8 @@ let

    buildInputs = [ portaudio ];

    nativeCheckInputs = (with python3.pkgs; [ pytestCheckHook ]) ++ [ gitMinimal ];
    nativeCheckInputs = (with python3.pkgs; [ pytestCheckHook ])
      ++ [ gitMinimal ];

    disabledTestPaths = [
      # Tests require network access
@@ -135,8 +129,7 @@ let
      "tests/help/test_help.py"
    ];

    disabledTests =
      [
    disabledTests = [
      # Tests require network
      "test_urls"
      "test_get_commit_message_with_custom_prompt"
@@ -150,8 +143,7 @@ let
      "test_main_exit_calls_version_check"
      # AssertionError: assert 2 == 1
      "test_simple_send_non_retryable_error"
      ]
      ++ lib.optionals stdenv.hostPlatform.isDarwin [
    ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
      # Tests fails on darwin
      "test_dark_mode_sets_code_theme"
      "test_default_env_file_sets_automatic_variable"
@@ -159,10 +151,8 @@ let
      "test_pipe_editor"
    ];

    makeWrapperArgs = [
      "--set AIDER_CHECK_UPDATE false"
      "--set AIDER_ANALYTICS false"
    ];
    makeWrapperArgs =
      [ "--set AIDER_CHECK_UPDATE false" "--set AIDER_ANALYTICS false" ];

    preCheck = ''
      export HOME=$(mktemp -d)
@@ -170,36 +160,31 @@ let
    '';

    optional-dependencies = with python3.pkgs; {
      playwright = [
        greenlet
        playwright
        pyee
        typing-extensions
      ];
      playwright = [ greenlet playwright pyee typing-extensions ];
    };

    passthru = {
      withPlaywright = aider-chat.overridePythonAttrs (
        { dependencies, makeWrapperArgs, propagatedBuildInputs ? [], ... }:
        {
          dependencies = dependencies ++ aider-chat.optional-dependencies.playwright;
          propagatedBuildInputs = propagatedBuildInputs ++ [ playwright-driver.browsers ];
      withPlaywright = aider-chat.overridePythonAttrs
        ({ dependencies, makeWrapperArgs, propagatedBuildInputs ? [ ], ... }: {
          dependencies = dependencies
            ++ aider-chat.optional-dependencies.playwright;
          propagatedBuildInputs = propagatedBuildInputs
            ++ [ playwright-driver.browsers ];
          makeWrapperArgs = makeWrapperArgs ++ [
            "--set PLAYWRIGHT_BROWSERS_PATH ${playwright-driver.browsers}"
            "--set PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS=true"
          ];
        }
      );
        });
    };

    meta = {
      description = "AI pair programming in your terminal";
      homepage = "https://github.com/paul-gauthier/aider";
      changelog = "https://github.com/paul-gauthier/aider/blob/v${version}/HISTORY.md";
      changelog =
        "https://github.com/paul-gauthier/aider/blob/v${version}/HISTORY.md";
      license = lib.licenses.asl20;
      maintainers = with lib.maintainers; [ happysalada ];
      mainProgram = "aider";
    };
  };
in
aider-chat
in aider-chat