Skip to content

Refactor to flake-parts and add NixOS tests that exercises dynamic derivation builds#33

Merged
elpdt852 merged 1 commit intomainfrom
feature/flake-parts-and-tests
Aug 24, 2025
Merged

Refactor to flake-parts and add NixOS tests that exercises dynamic derivation builds#33
elpdt852 merged 1 commit intomainfrom
feature/flake-parts-and-tests

Conversation

@elpdt852
Copy link
Copy Markdown
Contributor

Supersedes #32
Fixes #3

Highlights

  • Changes github actions to be consistent with nix-snapshotter
  • Migrate to flake-parts in a way that's consistent with nix-snapshotter
  • Adds NixOS tests that always exercises the derivation builds

Tests

I thought about the way #32 approached it, simply build it into a tmp store but it doesn't have the caching properties we'll get from magic-nix-cache. However, if we build it into /nix/store, it won't exercise the dynamic derivations part if it's cached. Using the nix-portable approach in #26 makes sense for development but we don't want to test nix-portable but actually a proper nix build.

I experimented whether we can run a NixOS test that:

  1. Always exercises the dynamic derivations
  2. Optimally caches everything
  3. More flexibility in testing, e.g. running the built executable or inspecting it with ldd, etc.

Turns out it's possible and even older nixes should be able to run these NixOS tests as it uses a dynamic derivation enabled nix inside the VM.

@elpdt852 elpdt852 force-pushed the feature/flake-parts-and-tests branch from 6d2bf04 to 7c7a46f Compare August 24, 2025 05:10
@elpdt852 elpdt852 marked this pull request as ready for review August 24, 2025 05:10
@elpdt852 elpdt852 force-pushed the feature/flake-parts-and-tests branch 5 times, most recently from f341d63 to 51d4bcd Compare August 24, 2025 05:29
…rivation builds

Signed-off-by: Edgar Lee <122112154+elpdt852@users.noreply.github.com>
@elpdt852 elpdt852 force-pushed the feature/flake-parts-and-tests branch from 51d4bcd to 18f50ee Compare August 24, 2025 05:37
@elpdt852 elpdt852 merged commit bc0eaef into main Aug 24, 2025
4 checks passed
@elpdt852 elpdt852 deleted the feature/flake-parts-and-tests branch August 24, 2025 16:21
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.

Add github actions CI

1 participant