Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: SilasMarvin/lsp-ai
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5e0416135b1cfb9d814b84fccd930d0d9de83bbe
Choose a base ref
..
head repository: SilasMarvin/lsp-ai
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7c44328451bacc0ac10a01125df804acfccf9006
Choose a head ref
Showing with 30 additions and 125 deletions.
  1. +0 −96 flake.lock
  2. +30 −29 flake.nix
96 changes: 0 additions & 96 deletions flake.lock

This file was deleted.

59 changes: 30 additions & 29 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
{
description = "LSP-AI: An open-source language server for AI-powered functionality";
description = "LSP-AI: Open-source language server for AI-powered functionality";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay.url = "github:oxalica/rust-overlay";
};

outputs = { self, nixpkgs, flake-utils, rust-overlay }:
flake-utils.lib.eachDefaultSystem (system:
outputs =
{
self,
nixpkgs,
flake-utils,
rust-overlay,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit system overlays;
pkgs = import nixpkgs {
inherit system overlays;
config.allowUnfree = true;
};
rustVersion = pkgs.rust-bin.stable.latest.default;

commonEnv = {
OPENSSL_NO_VENDOR = 1;
OPENSSL_DIR = "${pkgs.openssl.dev}";
OPENSSL_LIB_DIR = "${pkgs.openssl.out}/lib";
RUSTFLAGS = "-C target-cpu=native";
};

commonBuildInputs = with pkgs; [
openssl
openssl.dev
commonBuildInputs = with pkgs; [
openssl
zlib
];

commonNativeBuildInputs = with pkgs; [
pkg-config
cmake
rustVersion
commonNativeBuildInputs = with pkgs; [
pkg-config
cmake
rustVersion
perl
];

in rec {
in
rec {
packages = rec {
default = pkgs.rustPlatform.buildRustPackage ({
default = pkgs.rustPlatform.buildRustPackage {
pname = "lsp-ai";
version = "0.7.0";

@@ -53,21 +53,22 @@
nativeBuildInputs = commonNativeBuildInputs;
buildInputs = commonBuildInputs;

buildFeatures = [ "all" ];

doCheck = false;

meta = with pkgs.lib; {
description = "An open-source language server that serves as a backend for AI-powered functionality";
homepage = "https://github.com/SilasMarvin/lsp-ai";
license = licenses.mit;
maintainers = [ /* Add maintainers here */ ];
maintainers =
[
# Add maintainers here
];
};
} // commonEnv);
};

devPackage = default.overrideAttrs (oldAttrs: {
name = "lsp-ai-dev";

buildPhase = ''
export CARGO_HOME="/tmp/.cargo"
export RUSTUP_HOME="/tmp/.rustup"
@@ -81,19 +82,19 @@
});
};

devShells.default = pkgs.mkShell ({
devShells.default = pkgs.mkShell {
inputsFrom = [ packages.default ];
packages = with pkgs; [
rust-analyzer
clippy
rustfmt
];

shellHook = ''
export CARGO_HOME="/tmp/.cargo"
export RUSTUP_HOME="/tmp/.rustup"
'';
} // commonEnv);
};
}
);
}