Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
description = "Inspect - Entity-level code review for AI-assisted development";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
flake-utils.url = "github:numtide/flake-utils";
flake-parts.url = "github:hercules-ci/flake-parts";
};

outputs = {
self,
nixpkgs,
rust-overlay,
flake-utils,
flake-parts,
...
} @ inputs: let
#
in
flake-parts.lib.mkFlake {
inherit inputs;
} {
flake = rec {
};
systems = flake-utils.lib.allSystems;
perSystem = {
config,
self,
pkgs,
system,
...
}: let
overlays = [
(import rust-overlay)
];
pkgs = import nixpkgs {
inherit system overlays;
};
in {
devShells.default = pkgs.callPackage ./shell.nix {};
packages = {
default = pkgs.callPackage ./package.nix {};
};
};
};
}
36 changes: 36 additions & 0 deletions package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
pkgs ? import <nixpkgs> {},
lib,
...
}:
pkgs.rustPlatform.buildRustPackage rec {
pname = "inspect";
version = let
crate_name = pname + "-cli";
in
(builtins.fromTOML (lib.readFile "${src}/crates/${crate_name}/Cargo.toml")).package.version;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(builtins.fromTOML (lib.readFile "${src}/crates/${crate_name}/Cargo.toml")).package.version;
(builtins.fromTOML (builtins.readFile "${src}/crates/${crate_name}/Cargo.toml")).package.version;

Using non-existent lib.readFile instead of builtins.readFile causes Nix evaluation failure

Fix on Vercel


src = ./.;
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = { };
};

# disable tests
checkType = "debug";
doCheck = false;

nativeBuildInputs = with pkgs; [
installShellFiles
pkg-config

llvmPackages.clang
clang
];
buildInputs = with pkgs; [
openssl
pkg-config

(rust-bin.stable.latest.default)
];
}
10 changes: 10 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{pkgs ? import <nixpkgs> {}}:
pkgs.mkShell {
buildInputs = with pkgs.buildPackages; [
openssl
pkg-config

(rust-bin.stable.latest.default)
rust-analyzer
];
}
Loading