remove avante

This commit is contained in:
RingOfStorms (Joshua Bell) 2025-06-10 08:03:44 -05:00
parent 3d57156a38
commit 47104ea033
3 changed files with 126 additions and 133 deletions

17
flake.lock generated
View file

@ -863,22 +863,6 @@
"type": "github" "type": "github"
} }
}, },
"nvim_plugin-yetone/avante.nvim": {
"flake": false,
"locked": {
"lastModified": 1749541623,
"narHash": "sha256-6zVk1MmiNBxzsBd2sbSXpMlIrM9IBvJarSBt+fmXYBY=",
"owner": "yetone",
"repo": "avante.nvim",
"rev": "e2b34f6435edcb9ef0a051ddcf24693a5d8bba2b",
"type": "github"
},
"original": {
"owner": "yetone",
"repo": "avante.nvim",
"type": "github"
}
},
"nvim_plugin-zbirenbaum/copilot-cmp": { "nvim_plugin-zbirenbaum/copilot-cmp": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -967,7 +951,6 @@
"nvim_plugin-tpope/vim-surround": "nvim_plugin-tpope/vim-surround", "nvim_plugin-tpope/vim-surround": "nvim_plugin-tpope/vim-surround",
"nvim_plugin-uga-rosa/ccc.nvim": "nvim_plugin-uga-rosa/ccc.nvim", "nvim_plugin-uga-rosa/ccc.nvim": "nvim_plugin-uga-rosa/ccc.nvim",
"nvim_plugin-windwp/nvim-ts-autotag": "nvim_plugin-windwp/nvim-ts-autotag", "nvim_plugin-windwp/nvim-ts-autotag": "nvim_plugin-windwp/nvim-ts-autotag",
"nvim_plugin-yetone/avante.nvim": "nvim_plugin-yetone/avante.nvim",
"nvim_plugin-zbirenbaum/copilot-cmp": "nvim_plugin-zbirenbaum/copilot-cmp", "nvim_plugin-zbirenbaum/copilot-cmp": "nvim_plugin-zbirenbaum/copilot-cmp",
"nvim_plugin-zbirenbaum/copilot.lua": "nvim_plugin-zbirenbaum/copilot.lua", "nvim_plugin-zbirenbaum/copilot.lua": "nvim_plugin-zbirenbaum/copilot.lua",
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"

242
flake.nix
View file

@ -114,8 +114,8 @@
"nvim_plugin-zbirenbaum/copilot.lua".flake = false; "nvim_plugin-zbirenbaum/copilot.lua".flake = false;
"nvim_plugin-CopilotC-Nvim/CopilotChat.nvim".url = "github:CopilotC-Nvim/CopilotChat.nvim"; "nvim_plugin-CopilotC-Nvim/CopilotChat.nvim".url = "github:CopilotC-Nvim/CopilotChat.nvim";
"nvim_plugin-CopilotC-Nvim/CopilotChat.nvim".flake = false; "nvim_plugin-CopilotC-Nvim/CopilotChat.nvim".flake = false;
"nvim_plugin-yetone/avante.nvim".url = "github:yetone/avante.nvim"; # "nvim_plugin-yetone/avante.nvim".url = "github:yetone/avante.nvim";
"nvim_plugin-yetone/avante.nvim".flake = false; # "nvim_plugin-yetone/avante.nvim".flake = false;
# "nvim_plugin-HakonHarnes/img-clip.nvim".url = "github:HakonHarnes/img-clip.nvim"; # "nvim_plugin-HakonHarnes/img-clip.nvim".url = "github:HakonHarnes/img-clip.nvim";
# "nvim_plugin-HakonHarnes/img-clip.nvim".flake = false; # "nvim_plugin-HakonHarnes/img-clip.nvim".flake = false;
"nvim_plugin-stevearc/dressing.nvim".url = "github:stevearc/dressing.nvim"; "nvim_plugin-stevearc/dressing.nvim".url = "github:stevearc/dressing.nvim";
@ -175,43 +175,43 @@
"nvim_plugin-nvim-treesitter/nvim-treesitter" = nvim-treesitter.withAllGrammars; "nvim_plugin-nvim-treesitter/nvim-treesitter" = nvim-treesitter.withAllGrammars;
}; };
avante-nvim-lib = pkgs.rustPlatform.buildRustPackage { # avante-nvim-lib = pkgs.rustPlatform.buildRustPackage {
pname = "avante-nvim-lib"; # pname = "avante-nvim-lib";
version = "0.0.0"; # version = "0.0.0";
src = inputs."nvim_plugin-yetone/avante.nvim"; # src = inputs."nvim_plugin-yetone/avante.nvim";
#
buildFeatures = [ "luajit" ]; # buildFeatures = [ "luajit" ];
doCheck = false; # doCheck = false;
cargoLock = { # cargoLock = {
lockFile = inputs."nvim_plugin-yetone/avante.nvim" + "/Cargo.lock"; # lockFile = inputs."nvim_plugin-yetone/avante.nvim" + "/Cargo.lock";
allowBuiltinFetchGit = true; # allowBuiltinFetchGit = true;
}; # };
#
nativeBuildInputs = with pkgs; [ # nativeBuildInputs = with pkgs; [
pkg-config # pkg-config
]; # ];
#
buildInputs = with pkgs; [ # buildInputs = with pkgs; [
openssl.dev # openssl.dev
]; # ];
env = { # env = {
OPENSSL_NO_VENDOR = "1"; # OPENSSL_NO_VENDOR = "1";
OPENSSL_LIB_DIR = "${pkgs.openssl.out}/lib"; # OPENSSL_LIB_DIR = "${pkgs.openssl.out}/lib";
OPENSSL_INCLUDE_DIR = "${pkgs.openssl.dev}/include"; # OPENSSL_INCLUDE_DIR = "${pkgs.openssl.dev}/include";
OPENSSL_DIR = "${pkgs.openssl.dev}"; # OPENSSL_DIR = "${pkgs.openssl.dev}";
}; # };
postInstall = '' # postInstall = ''
# mv $out/lib/libavante_repo_map.so $out/lib/avante_repo_map.so # # mv $out/lib/libavante_repo_map.so $out/lib/avante_repo_map.so
for f in $out/lib/lib*; do # for f in $out/lib/lib*; do
mv "$f" "$out/lib/''${f##*/lib}" # mv "$f" "$out/lib/''${f##*/lib}"
done # done
''; # '';
meta = { # meta = {
description = "Avante nvim libraries"; # description = "Avante nvim libraries";
homepage = "https://github.com/yetone/avante.nvim"; # homepage = "https://github.com/yetone/avante.nvim";
license = pkgs.lib.licenses.asl20; # license = pkgs.lib.licenses.asl20;
}; # };
}; # };
# This will be how we put any nix related stuff into our lua config # This will be how we put any nix related stuff into our lua config
luaNixGlobal = luaNixGlobal =
@ -299,84 +299,94 @@
} }
)).overrideAttrs )).overrideAttrs
(old: { (old: {
generatedWrapperArgs = old.generatedWrapperArgs or [ ] ++ [ generatedWrapperArgs =
# Add runtime dependencies to neovim path old.generatedWrapperArgs or [ ]
"--prefix" ++ [
"PATH" # Add runtime dependencies to neovim path
":" "--prefix"
"${lib.makeBinPath runtimeDependencies}" "PATH"
# Some we will suffix so we pick up the local dev shell intead and default to these otherwise ":"
"--suffix" "${lib.makeBinPath runtimeDependencies}"
"PATH" # Some we will suffix so we pick up the local dev shell intead and default to these otherwise
":" "--suffix"
"${lib.makeBinPath defaultRuntimeDependencies}" "PATH"
# Set the LAZY env path to the nix store, see init.lua for how it is used ":"
"--set" "${lib.makeBinPath defaultRuntimeDependencies}"
"LAZY" ]
"${lazyPath}" ++ [
# Link avante libraries # Set the LAZY env path to the nix store, see init.lua for how it is used
"--prefix" "--set"
"LD_LIBRARY_PATH" "LAZY"
":" "${lazyPath}"
"${avante-nvim-lib}/lib" ]
# Add Lua C modules path TODO make these conditional so on linux, and dylib for mac it shouldn't be both... # ++ [
"--prefix" # # Link avante libraries
"LUA_CPATH" # "--prefix"
";" # "LD_LIBRARY_PATH"
"${avante-nvim-lib}/lib/?.so" # ":"
"--prefix" # "${avante-nvim-lib}/lib"
"LUA_CPATH" # # Add Lua C modules path TODO make these conditional so on linux, and dylib for mac it shouldn't be both...
";" # "--prefix"
"${avante-nvim-lib}/lib/?.dylib" # "LUA_CPATH"
# Don't use default directories to not collide with another neovim config # ";"
# All things at runtime should be deletable since we are using nix to handle downloads and bins # "${avante-nvim-lib}/lib/?.so"
# so I've chosen to put everything into the local state directory. # "--prefix"
"--run" # "LUA_CPATH"
''export NVIM_FLAKE_BASE_DIR="''${XDG_STATE_HOME:-$HOME/.local/state}"'' # ";"
"--run" # "${avante-nvim-lib}/lib/?.dylib"
''export XDG_CONFIG_HOME="$NVIM_FLAKE_BASE_DIR/nvim_ringofstorms_${version}/config"'' # ]
"--run" ++ [
''export XDG_DATA_HOME="$NVIM_FLAKE_BASE_DIR/nvim_ringofstorms_${version}/share"'' # Don't use default directories to not collide with another neovim config
"--run" # All things at runtime should be deletable since we are using nix to handle downloads and bins
''export XDG_RUNTIME_DIR="$NVIM_FLAKE_BASE_DIR/nvim_ringofstorms_${version}/run"'' # so I've chosen to put everything into the local state directory.
"--run" "--run"
''export XDG_STATE_HOME="$NVIM_FLAKE_BASE_DIR/nvim_ringofstorms_${version}/state"'' ''export NVIM_FLAKE_BASE_DIR="''${XDG_STATE_HOME:-$HOME/.local/state}"''
"--run" "--run"
''export XDG_CACHE_HOME="$NVIM_FLAKE_BASE_DIR/nvim_ringofstorms_${version}/cache"'' ''export XDG_CONFIG_HOME="$NVIM_FLAKE_BASE_DIR/nvim_ringofstorms_${version}/config"''
# Fix wayland copy paste from system clipboard which uses XDG_RUNTIME_DIR so we need to symlink that into this "--run"
"--run" ''export XDG_DATA_HOME="$NVIM_FLAKE_BASE_DIR/nvim_ringofstorms_${version}/share"''
''[ ! -d "$XDG_RUNTIME_DIR" ] && mkdir -p "$XDG_RUNTIME_DIR"'' "--run"
"--run" ''export XDG_RUNTIME_DIR="$NVIM_FLAKE_BASE_DIR/nvim_ringofstorms_${version}/run"''
'' "--run"
if [ -n "$WAYLAND_DISPLAY" ]; then ''export XDG_STATE_HOME="$NVIM_FLAKE_BASE_DIR/nvim_ringofstorms_${version}/state"''
if [ ! -S "$XDG_RUNTIME_DIR/wayland-0" ]; then "--run"
mkdir -p "$XDG_RUNTIME_DIR" ''export XDG_CACHE_HOME="$NVIM_FLAKE_BASE_DIR/nvim_ringofstorms_${version}/cache"''
ln -sf /run/user/$(id -u)/wayland-0 "$XDG_RUNTIME_DIR/wayland-0" # Fix wayland copy paste from system clipboard which uses XDG_RUNTIME_DIR so we need to symlink that into this
"--run"
''[ ! -d "$XDG_RUNTIME_DIR" ] && mkdir -p "$XDG_RUNTIME_DIR"''
"--run"
''
if [ -n "$WAYLAND_DISPLAY" ]; then
if [ ! -S "$XDG_RUNTIME_DIR/wayland-0" ]; then
mkdir -p "$XDG_RUNTIME_DIR"
ln -sf /run/user/$(id -u)/wayland-0 "$XDG_RUNTIME_DIR/wayland-0"
fi
if [ ! -S "$XDG_RUNTIME_DIR/wayland-1" ]; then
mkdir -p "$XDG_RUNTIME_DIR"
ln -sf /run/user/$(id -u)/wayland-1 "$XDG_RUNTIME_DIR/wayland-1"
fi
fi fi
if [ ! -S "$XDG_RUNTIME_DIR/wayland-1" ]; then ''
mkdir -p "$XDG_RUNTIME_DIR" ]
ln -sf /run/user/$(id -u)/wayland-1 "$XDG_RUNTIME_DIR/wayland-1" ++ [
fi # Clear proxy environment variables
fi "--unset"
'' "http_proxy"
# Clear proxy environment variables "--unset"
"--unset" "https_proxy"
"http_proxy" "--unset"
"--unset" "ftp_proxy"
"https_proxy" "--unset"
"--unset" "all_proxy"
"ftp_proxy" "--unset"
"--unset" "HTTP_PROXY"
"all_proxy" "--unset"
"--unset" "HTTPS_PROXY"
"HTTP_PROXY" "--unset"
"--unset" "FTP_PROXY"
"HTTPS_PROXY" "--unset"
"--unset" "ALL_PROXY"
"FTP_PROXY" ];
"--unset"
"ALL_PROXY"
];
}); });
} }
); );