Unverified Commit ca52dfcb authored by Michael Maurer's avatar Michael Maurer
Browse files

aider-chat: run nixfmt with nixfmt-rfc-style

parent 62b6f9a5
Loading
Loading
Loading
Loading
+58 −38
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 {
@@ -119,8 +126,7 @@ let

    buildInputs = [ portaudio ];

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

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

    disabledTests = [
    disabledTests =
      [
        # Tests require network
        "test_urls"
        "test_get_commit_message_with_custom_prompt"
@@ -143,7 +150,8 @@ 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"
@@ -151,8 +159,10 @@ 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)
@@ -160,31 +170,41 @@ 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