Skip to content

Add a Nix flake with packages for colgrep and a devshell#114

Merged
raphaelsty merged 1 commit into
lightonai:mainfrom
fu5ha:add-flake
May 31, 2026
Merged

Add a Nix flake with packages for colgrep and a devshell#114
raphaelsty merged 1 commit into
lightonai:mainfrom
fu5ha:add-flake

Conversation

@fu5ha
Copy link
Copy Markdown
Contributor

@fu5ha fu5ha commented May 31, 2026

Adds a basic flake.nix which provides:

  • colgrep and colgrep-cuda packages
  • A dev shell with the necessary environment to build colgrep
  • A library function to build special packages set (only colgrep for now) with a specific cuda capabilities set, using the existing nix cuda pattern

This can be used by developers to quickly obtain a development environment using Nix, and can be used like so to add a specific colgrep package to a flake-based Nix environment like NixOS, home-manager, etc like so:

inputs = {
   // ...
   next-plaid = {
       url = "github:lightonai/next-plaid";
       inputs.nixpkgs.follows = "nixpkgs";
   };
};

outputs = inputs@{ self, nixpkgs, ... }:
let
    nextplaid-pkgs = (input.next-plaid.lib.mkPackagesWithCudaCapabilities [ "7.5" ]).${system};
in
{
    // ...
    // or wherever else packages are specified in one's config
    home.packages = [
        // ...
        nextplaid-pkgs.colgrep
    ];
};

It currently uses a semi-ugly wrapper style where we just inject environment variables. Ideally, the Rust packages that pull in the libs that need this wrapping (onnx-runtime, cuda libs) could be modified to allow link-time dynamic linking for these, which would then allow Nix's RPATH patching to let them link against the location of the libs in the Nix store without the need for wrapping with env vars. But, this isn't necessarily the end of the world for now.

@raphaelsty
Copy link
Copy Markdown
Collaborator

Hi @fu5ha, thank you for the MR ! Merging it right now 😊

@raphaelsty raphaelsty merged commit aa6d7da into lightonai:main May 31, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants