mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-11-03 20:22:21 +00:00 
			
		
		
		
	
		
			Some checks are pending
		
		
	
	Set up binary cache / cachix (default) (push) Waiting to run
				
			Set up binary cache / cachix (maximal) (push) Waiting to run
				
			Set up binary cache / cachix (nix) (push) Waiting to run
				
			Treewide Checks / Validate flake (push) Waiting to run
				
			Treewide Checks / Check formatting (push) Waiting to run
				
			Treewide Checks / Check source tree for typos (push) Waiting to run
				
			Treewide Checks / Validate documentation builds (push) Waiting to run
				
			Treewide Checks / Validate hyperlinks in documentation sources (push) Waiting to run
				
			Treewide Checks / Validate Editorconfig conformance (push) Waiting to run
				
			Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I6a6a69644b51c952480434b2355f1f1e4b22511c
		
			
				
	
	
		
			70 lines
		
	
	
	
		
			1.4 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			70 lines
		
	
	
	
		
			1.4 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
{
 | 
						|
  pins,
 | 
						|
  openssl,
 | 
						|
  pkg-config,
 | 
						|
  rustPlatform,
 | 
						|
  stdenv,
 | 
						|
  vimUtils,
 | 
						|
  makeWrapper,
 | 
						|
  pkgs,
 | 
						|
  ...
 | 
						|
}: let
 | 
						|
  # From npins
 | 
						|
  pin = pins.avante-nvim;
 | 
						|
  version = pin.branch;
 | 
						|
  src = pkgs.fetchFromGitHub {
 | 
						|
    inherit (pin.repository) owner repo;
 | 
						|
    rev = pin.revision;
 | 
						|
    sha256 = pin.hash;
 | 
						|
  };
 | 
						|
 | 
						|
  avante-nvim-lib = rustPlatform.buildRustPackage {
 | 
						|
    pname = "avante-nvim-lib";
 | 
						|
    inherit version src;
 | 
						|
 | 
						|
    cargoHash = "sha256-pTWCT2s820mjnfTscFnoSKC37RE7DAPKxP71QuM+JXQ=";
 | 
						|
 | 
						|
    nativeBuildInputs = [
 | 
						|
      pkg-config
 | 
						|
      makeWrapper
 | 
						|
      pkgs.perl
 | 
						|
    ];
 | 
						|
 | 
						|
    buildInputs = [
 | 
						|
      openssl
 | 
						|
    ];
 | 
						|
 | 
						|
    buildFeatures = ["luajit"];
 | 
						|
 | 
						|
    checkFlags = [
 | 
						|
      # Disabled because they access the network.
 | 
						|
      "--skip=test_hf"
 | 
						|
      "--skip=test_public_url"
 | 
						|
      "--skip=test_roundtrip"
 | 
						|
      "--skip=test_fetch_md"
 | 
						|
    ];
 | 
						|
  };
 | 
						|
in
 | 
						|
  vimUtils.buildVimPlugin {
 | 
						|
    pname = "avante-nvim";
 | 
						|
    inherit version src;
 | 
						|
 | 
						|
    doCheck = false;
 | 
						|
 | 
						|
    postInstall = let
 | 
						|
      ext = stdenv.hostPlatform.extensions.sharedLibrary;
 | 
						|
    in ''
 | 
						|
      mkdir -p $out/build
 | 
						|
      for lib in "avante_repo_map" "avante_templates" "avante_tokenizers" "avante_html2md"; do
 | 
						|
        ln -s ${avante-nvim-lib}/lib/lib$lib${ext} $out/build/$lib${ext}
 | 
						|
      done
 | 
						|
    '';
 | 
						|
 | 
						|
    nvimSkipModules = [
 | 
						|
      # Requires setup with corresponding provider
 | 
						|
      "avante.providers.azure"
 | 
						|
      "avante.providers.copilot"
 | 
						|
      "avante.providers.vertex_claude"
 | 
						|
      "avante.providers.ollama"
 | 
						|
    ];
 | 
						|
  }
 |