Skip to content

feat(flake): make nix run github:mincomk/bootit work - #13

Merged
mincomk merged 1 commit into
mainfrom
feat/nix-flake
Oct 22, 2026
Merged

mincomk merged 1 commit into
mainfrom
feat/nix-flake

Conversation

@mincomk

@mincomk mincomk commented Oct 22, 2026

Copy link
Copy Markdown
Owner

nix run github:mincomk/bootit did not work because the committed flake never evaluated:

  • rust-bin.fromRustupToolchainFile ./rust-toolchain.toml — the repo has no rust-toolchain.toml.
  • lib.optionals / stdenv.isDarwin used without lib / stdenv in scope.

It was a crane template that was never filled in (description still said "A very cool CLI tool").

What this does

  • Flake reduced to a single nixpkgs input with rustPlatform.buildRustPackage and cargoLock.lockFile (no hash to maintain), so it evaluates from a cold checkout. crane, rust-overlay and flake-utils are gone, and flake.lock is regenerated accordingly.
  • Both bins (bootit and it) are installed to $out/bin by buildRustPackage.
  • apps.default is declared, so nix run works. Version is read from Cargo.toml rather than hardcoded.
  • New flake CI job: nix flake check --no-build, nix build .#default, nix run .#default -- --version.

Verifying

nix run github:mincomk/bootit -- scan          # after merge
nix profile install github:mincomk/bootit      # gives bootit + it

CI's flake job is the check for this PR (the machine this was written on cannot run a full nixpkgs evaluation).

The committed flake never evaluated: it pointed at ./rust-toolchain.toml,
which the repo does not have, and used `lib` / `stdenv` without binding
them. It was a crane template left half-filled.

Replace crane, rust-overlay and flake-utils with a single nixpkgs input
and a plain rustPlatform.buildRustPackage, so the flake evaluates from a
cold checkout and both bins (`bootit` and `it`) land in $out/bin:

    nix run github:mincomk/bootit -- scan
    nix profile install github:mincomk/bootit

Also add a CI job that evaluates, builds and runs the flake, and document
the Nix install path in the README.

Co-authored-by: Attacca <attacca@walruslab.org>
@mincomk
mincomk merged commit 3a9436a into main Oct 22, 2026
3 checks passed
@mincomk
mincomk deleted the feat/nix-flake branch October 22, 2026 14:03
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