Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix: Add Nix Flake support #80

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shymega
Copy link

@shymega shymega commented Dec 1, 2024

This commit modifies the CMakeLists.txt to allow for Nix to manage submodules itself - by cloning the repo seaprately, which helps with reproducible builds.

It also adds:

  • default.nix/shell.nix This allows for legacy Nix tooling like nix-build/nix-shell to work.
  • flake.nix This is for the (new) Nix Flake support.
  • flake.lock As above, but for tracking Flake inputs.
  • .envrc This allows for a fully self-contained developer environment to be setup with Nix.
  • nix/default.nix This is the main package derivation. Both this repo & Nixpkgs are derived from the same codebase.

Squashed commits:

  • CMakeLists: Add option for allowing/denying submodule fetch

    This provides finer granularity for packaging, such as Nix, where submodules may not be wanted, and instead for the supporting Git repositories to be fetched separately.

@shymega
Copy link
Author

shymega commented Dec 1, 2024

I finally had delivery of a VITURE Pro today, after being lost, but I've tested my Flake with the glasses, and it does seem to work - about to test mouse control shortly.

@shymega
Copy link
Author

shymega commented Dec 1, 2024

The long-term steps would be to upstream the derivation (+ Breezy) to Nixpkgs, as well as a Nix module, and a CI workflow for this repo (+ Breezy).

@shymega shymega force-pushed the shymega/nix-flake-support branch from 489b7fc to fba3fa3 Compare December 2, 2024 20:36
@shymega shymega force-pushed the shymega/nix-flake-support branch 4 times, most recently from 336ae4c to 519285a Compare December 5, 2024 23:05
This commit modifies the CMakeLists.txt to allow for Nix to manage
submodules itself - by cloning the repo seaprately, which helps with
reproducible builds.

It also adds:

- `default.nix`/`shell.nix`
  This allows for legacy Nix tooling like `nix-build`/`nix-shell` to work.
- `flake.nix`
  This is for the (new) Nix Flake support.
- `flake.lock`
  As above, but for tracking Flake inputs.
- `.envrc`
  This allows for a fully self-contained developer environment to be
  setup with Nix.
- `nix/default.nix`
  This is the main package derivation. Both this repo & Nixpkgs are
  derived from the same codebase.

Squashed commits:

- CMakeLists: Add option for allowing/denying submodule fetch

  This provides finer granularity for packaging, such as Nix, where
  submodules may not be wanted, and instead for the supporting Git
  repositories to be fetched separately.

Signed-off-by: Dom Rodriguez <[email protected]>
@shymega shymega force-pushed the shymega/nix-flake-support branch from 519285a to 77822f9 Compare December 6, 2024 20:33
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.

1 participant