Add copilot extension, remove aider derivation & flake update #10

Merged
softinio merged 2 commits from push-nxsunykvnnks into main 2025-03-09 16:13:37 -07:00
5 changed files with 24 additions and 225 deletions

32
flake.lock generated
View file

@ -28,11 +28,11 @@
]
},
"locked": {
"lastModified": 1740845322,
"narHash": "sha256-AXEgFj3C0YJhu9k1OhbRhiA6FnDr81dQZ65U3DhaWpw=",
"lastModified": 1741543064,
"narHash": "sha256-AjXyS3ACxWAd+h3NSkrflN+uC0Tq1XFqox472RF6yh0=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "fcac3d6d88302a5e64f6cb8014ac785e08874c8d",
"rev": "db4386d686fb0b2788e7422e6a2299deace9c4b1",
"type": "github"
},
"original": {
@ -48,11 +48,11 @@
]
},
"locked": {
"lastModified": 1740755725,
"narHash": "sha256-amZbqP84H/ApugaT+TADXTB3NbjkVHI9Vac1saIk0kE=",
"lastModified": 1741229100,
"narHash": "sha256-0HwrTDXp9buEwal/1ymK9uQmzUD5ozIA7CJGqnT/gLs=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "5d6e0851b60508cffd66b4a6982440a40720338d",
"rev": "adf5c88ba1fe21af5c083b4d655004431f20c5ab",
"type": "github"
},
"original": {
@ -63,27 +63,27 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1740828860,
"narHash": "sha256-cjbHI+zUzK5CPsQZqMhE3npTyYFt9tJ3+ohcfaOF/WM=",
"lastModified": 1741402956,
"narHash": "sha256-y2hByvBM03s9T2fpeLjW6iprbxnhV9mJMmSwCHc41ZQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "303bd8071377433a2d8f76e684ec773d70c5b642",
"rev": "ed0b1881565c1ffef490c10d663d4f542031dad3",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1740828860,
"narHash": "sha256-cjbHI+zUzK5CPsQZqMhE3npTyYFt9tJ3+ohcfaOF/WM=",
"lastModified": 1741379970,
"narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "303bd8071377433a2d8f76e684ec773d70c5b642",
"rev": "36fd87baa9083f34f7f5027900b62ee6d09b1f2f",
"type": "github"
},
"original": {
@ -100,11 +100,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1740968044,
"narHash": "sha256-nvDJeg1CZHl5LfzSjF0fg4vN43yWi11g0l+fqCPrPsY=",
"lastModified": 1741560307,
"narHash": "sha256-sS25HPoonksGtSmQsOyMVESYLDxxUZVmEQGPGlHWHIk=",
"owner": "nix-community",
"repo": "nur",
"rev": "27c215df50e54f048a03616eb9fc20190e5d71f5",
"rev": "4ae43b04c54350575c1e0fd6ee1547629b2e06ff",
"type": "github"
},
"original": {

View file

@ -2,7 +2,7 @@
description = "Nix and home-manager configurations for Softinio's macbook";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nix-darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";

View file

@ -14,6 +14,7 @@
pkg:
builtins.elem (lib.getName pkg) [
"discord"
"gh-copilot"
"slack"
"vscode"
"vscode-extension-github-copilot"
@ -151,6 +152,9 @@
programs.gh = {
enable = true;
extensions = [
pkgs.gh-copilot
];
settings = {
editor = "nvim";
git_protocol = "ssh";

View file

@ -1,204 +0,0 @@
{ lib, pkgs, ... }:
let
python3 = pkgs.python312.override {
self = python3;
packageOverrides = _: super: { tree-sitter = super.tree-sitter_0_21; };
};
version = "0.74.1";
aider-chat = python3.pkgs.buildPythonPackage {
pname = "aider-chat";
inherit version;
pyproject = true;
src = pkgs.fetchFromGitHub {
owner = "Aider-AI";
repo = "aider";
tag = "v${version}";
hash = "sha256-JXzkvuSOOEUxNqF6l5USzIPftpnIW+CptEv/0yp0eGM=";
};
pythonRelaxDeps = true;
build-system = with python3.pkgs; [ setuptools-scm ];
dependencies = with python3.pkgs; [
aiohappyeyeballs
aiohttp
aiosignal
annotated-types
anyio
attrs
backoff
beautifulsoup4
certifi
cffi
charset-normalizer
click
configargparse
diff-match-patch
diskcache
distro
filelock
flake8
frozenlist
fsspec
gitdb
gitpython
grep-ast
h11
httpcore
httpx
huggingface-hub
idna
importlib-resources
jinja2
jiter
json5
jsonschema
jsonschema-specifications
litellm
markdown-it-py
markupsafe
mccabe
mdurl
multidict
networkx
numpy
openai
packaging
pathspec
pexpect
pillow
prompt-toolkit
psutil
ptyprocess
pycodestyle
pycparser
pydantic
pydantic-core
pydub
pyflakes
pygments
pypandoc
pyperclip
python-dotenv
pyyaml
referencing
regex
requests
rich
rpds-py
scipy
smmap
sniffio
sounddevice
soundfile
soupsieve
tiktoken
tokenizers
tqdm
tree-sitter
tree-sitter-languages
typing-extensions
urllib3
watchfiles
wcwidth
yarl
zipp
pip
# Not listed in requirements
mixpanel
monotonic
posthog
propcache
python-dateutil
];
buildInputs = [ pkgs.portaudio ];
nativeCheckInputs = (with python3.pkgs; [ pytestCheckHook ]) ++ [ pkgs.gitMinimal ];
disabledTestPaths = [
# Tests require network access
"tests/scrape/test_scrape.py"
# Expected 'mock' to have been called once
"tests/help/test_help.py"
];
disabledTests =
[
# Tests require network
"test_urls"
"test_get_commit_message_with_custom_prompt"
# FileNotFoundError
"test_get_commit_message"
# Expected 'launch_gui' to have been called once
"test_browser_flag_imports_streamlit"
# AttributeError
"test_simple_send_with_retries"
# Expected 'check_version' to have been called once
"test_main_exit_calls_version_check"
# AssertionError: assert 2 == 1
"test_simple_send_non_retryable_error"
]
++ lib.optionals pkgs.stdenv.hostPlatform.isDarwin [
# Tests fails on darwin
"test_dark_mode_sets_code_theme"
"test_default_env_file_sets_automatic_variable"
# FileNotFoundError: [Errno 2] No such file or directory: 'vim'
"test_pipe_editor"
];
makeWrapperArgs = [
"--set AIDER_CHECK_UPDATE false"
"--set AIDER_ANALYTICS false"
];
preCheck = ''
export HOME=$(mktemp -d)
export AIDER_ANALYTICS="false"
'';
optional-dependencies = with python3.pkgs; {
playwright = [
greenlet
playwright
pyee
typing-extensions
];
};
passthru = {
withPlaywright = aider-chat.overridePythonAttrs (
{
dependencies,
buildInputs,
makeWrapperArgs,
...
}:
{
dependencies = dependencies ++ aider-chat.optional-dependencies.playwright;
buildInputs = buildInputs ++ [ pkgs.playwright-driver.browsers ];
makeWrapperArgs = makeWrapperArgs ++ [
"--set PLAYWRIGHT_BROWSERS_PATH ${pkgs.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";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ happysalada ];
mainProgram = "aider";
};
};
in
aider-chat

View file

@ -1,12 +1,11 @@
{ lib, pkgs, ... }:
{ pkgs, ... }:
let
aiderConfig = builtins.readFile ./aider.yml;
aiderPkgs = import ./aider-deriv.nix { inherit lib pkgs; };
in
{
home.packages = [
aiderPkgs.withPlaywright
home.packages = with pkgs; [
aider-chat.withPlaywright
];
home.file.".aider.conf.yml".text = aiderConfig;
}