Skip to content

[FEAT] nix setup#332

Merged
makeecat merged 2 commits into
masterfrom
yang/feat/nix
May 17, 2025
Merged

[FEAT] nix setup#332
makeecat merged 2 commits into
masterfrom
yang/feat/nix

Conversation

@makeecat

@makeecat makeecat commented May 16, 2025

Copy link
Copy Markdown
Collaborator
  • non-cuda option
cd support/nix
nix-shell
cargo build --workspace --features macro_debug,mock,perfui,image,kornia,python,gst,faer,nalgebra,glam,debug_pane,bincode

  • cuda option (need a lot of disk space)
cd support/nix
nix-shell --arg withCuda true
cargo build --workspace --all-features

@makeecat makeecat requested a review from gbin May 16, 2025 21:53
@makeecat makeecat self-assigned this May 16, 2025
@makeecat makeecat added the enhancement New feature or request label May 16, 2025
@gbin

gbin commented May 17, 2025

Copy link
Copy Markdown
Collaborator

For those under arch linux:

paru -S nix
sudo systemctl start nix-daemon
git checkout yang/feat/nix
cd support/nix
export NIX_PATH=nixpkgs=channel:nixos-unstable
nix-shell

@gbin

gbin commented May 17, 2025

Copy link
Copy Markdown
Collaborator

Verified with:

# no Cuda
which rustc
cargo build
-> no issue

and

nix-shell --arg withCuda true
cd core/cu29_runtime
which rustc
nix/store/pifk71jhdhnivy6iiq6lnnvakdb2hr7c-rust-default-1.87.0/bin/rustc
which nvcc
-> /nix/store/k370ii4q47v3ch1y75dbghj9zcz4yfjn-cuda-merged-12.8/bin/nvcc
cargo build --features cuda
-> no issue

@gbin gbin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

That is really cool that now we also have a deterministic development environment too!

@makeecat makeecat requested a review from Copilot May 17, 2025 17:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new Nix development environment setup for the Copper‑rs project with optional CUDA support.

  • Adds a comprehensive shell.nix configuration that conditionally enables CUDA-specific packages and environment variables.
  • Introduces flake.nix for flake‑based environment configuration, including a dedicated CUDA development shell.
  • Updates the README to document the usage and features of the Nix development environment.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
support/nix/shell.nix Added shell configuration with conditional CUDA support and environment variable setup.
support/nix/flake.nix Added flake-based configuration for multiple development shells including CUDA support.
support/nix/README.md Updated documentation to guide users through environment setup with and without CUDA.

Comment thread support/nix/flake.nix
@makeecat makeecat merged commit 957326c into master May 17, 2025
9 checks passed
@makeecat makeecat deleted the yang/feat/nix branch May 17, 2025 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants