mirror of
https://github.com/lotabout/skim.git
synced 2026-09-10 07:16:23 -04:00
* chore: migrate bench.py to rust to remove python deps * feat: replace rayon with a custom thread pool manager * wip: insert into item_list processed_items directly from matcher * wip: perf optimizations * wip: perf optimizations * wip: reader perf optimizations * fix: skip --bench injected in bench args * chore: add ARCHITECTURE.md * Update src/helper/item_reader.rs Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update src/matcher.rs Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * feat: use the same pool between reader and matcher * chore: misc * fix: tests --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
77 lines
2.2 KiB
Nix
77 lines
2.2 KiB
Nix
{
|
|
description = "Nix flake for skim development";
|
|
|
|
inputs.nixpkgs.url = "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz";
|
|
|
|
outputs =
|
|
inputs:
|
|
let
|
|
inherit (inputs.nixpkgs) lib;
|
|
systems = lib.systems.flakeExposed;
|
|
eachSystem = lib.genAttrs systems;
|
|
pkgsFor =
|
|
system:
|
|
import inputs.nixpkgs {
|
|
inherit system;
|
|
config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "vagrant" ];
|
|
};
|
|
in
|
|
{
|
|
devShells = eachSystem (
|
|
system:
|
|
let
|
|
pkgs = pkgsFor system;
|
|
|
|
# --- package groups -------------------------------------------------------
|
|
base = with pkgs; [
|
|
rustup
|
|
just
|
|
];
|
|
tests = with pkgs; [
|
|
cargo-nextest
|
|
cargo-insta
|
|
cargo-llvm-cov
|
|
tmux
|
|
];
|
|
utils = with pkgs; [
|
|
hyperfine
|
|
cargo-edit
|
|
cargo-public-api
|
|
git-cliff
|
|
cargo-dist
|
|
];
|
|
gungraun = with pkgs; [
|
|
valgrind
|
|
libclang
|
|
binutils
|
|
];
|
|
vagrantDeps = with pkgs; [
|
|
vagrant
|
|
rsync
|
|
];
|
|
|
|
# --- shell hooks (only groups that need env vars) -------------------------
|
|
gungraunHook = ''
|
|
export LIBCLANG_PATH="${pkgs.libclang.lib}/lib"
|
|
export LD_LIBRARY_PATH="${pkgs.valgrind.out}/lib:$LD_LIBRARY_PATH"
|
|
'';
|
|
vagrantHook = ''
|
|
export VAGRANT_LIBVIRT_OVMF_CODE="${pkgs.OVMF.fd}/FV/OVMF_CODE.fd"
|
|
'';
|
|
|
|
mkShell = packages: shellHook: pkgs.mkShellNoCC { inherit packages shellHook; };
|
|
in
|
|
{
|
|
default = mkShell base "";
|
|
tests = mkShell (base ++ tests) "";
|
|
utils = mkShell (base ++ utils) "";
|
|
gungraun = mkShell (base ++ gungraun) gungraunHook;
|
|
vagrant = mkShell (base ++ vagrantDeps) vagrantHook;
|
|
full = mkShell (base ++ tests ++ utils ++ gungraun ++ vagrantDeps) (gungraunHook + vagrantHook);
|
|
}
|
|
);
|
|
|
|
formatter = eachSystem (system: (pkgsFor system).nixfmt);
|
|
};
|
|
}
|