Draft
Conversation
Remove Cargo.lock from .gitignore, too
There are quite a few finer detailed points worth exploring. * Ignoring .git and nix directories, as well as any gitignored files ensures that the null-db binary is not built more than necessary when iterating in development. * RUSTC_BOOTSTRAP is a workaround - you can use an unstable toolchain if you want to using some other overlay or something, but caveat emptor. * The layout with a default.nix in the top-level directory is a personal idiom, not exactly worldwide. I like to expose the whole package set from the top-level and use the --attr flag to access things in there.
The module includes a null-db service with argv and firewall options. Argv is made a freeform type to allow future flags not to require new options.
3b38f45 to
6a1fa24
Compare
This ensures the diagnostic is printed at program start rather than on exit. Successful exit is almost guaranteed to never happen.
Otherwise elections never happen
This is meant for use with `nix-shell` in the project root or `nix-shell /path/to/project/root`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After obtaining nix on linux (macOS is possible, but quite a bit of work) you can run these tests and explore.
nix repl --file /path/to/null-db- inspect nixpkgs and evaluate nix expressionsnix-shell /path/to/null-db- jump into a dev environment with the tools used to build null-dbnix-build /path/to/null-db --attr null-db- build the null-db in nix and create a symlink to the result in./resultnix-build /path/to/null-db --attr null-db.tests.basic-raft- run a basic nixos-test (currently failing). If it succeeds then a symlink will be created in./result$(nix-build --no-out-link --attr null-db.tests.basic-raft.driverInteractive)/bin/nixos-test-driver- build and enter a python repl where you can run the vms and test script or otherwise interact with the nixos test environment (no./resultcreated because of--no-out-link)Best reviewed per-commit.