@philiptaron and @wolfgangwalther are admins of this repository, while everybody in @NixOS/nixpkgs-ci has write access, as well as @infinisil and @willbush.
Enter the development environment in this directory either automatically with
direnv or manually with
nix-shellThe most important tools and commands in this environment are:
-
rust-analyzer to have an IDE-like experience for your own editor.
-
Running tests:
cargo test -
Formatting:
treefmt
-
Linting:
cargo clippy --all-targets
Optionally, check out extra lints or uncomment them at the top of
main.rs.cargo clippy --all-targets -- -W clippy::nursery -W clippy::pedantic
-
Running the main CI checks locally:
nix-build -A ci
Integration tests are declared in ./tests as subdirectories imitating Nixpkgs with these files:
-
main: A Nixpkgs root directory with:-
default.nix: Always containsimport <test-nixpkgs> { root = ./.; }
which makes
nix-instantiate <subdir> --eval -A <attr> --arg overlays <overlays>work very similarly to the real Nixpkgs, just enough for the program to be able to test it.
-
pkgs/by-name: Thepkgs/by-namedirectory to check. -
pkgs/top-level/all-packages.nix(optional): Contains an overlay of the formself: super: { # ... }
allowing the simulation of package overrides to the real
pkgs/top-level/all-packages.nix. The default is an empty overlay.
-
-
base(optional): Contains another Nixpkgs root directory with potentially any of the above structures. This is used to test ratchet checks. -
expected(optional): A file containing the expected standard output. The default is expecting an empty standard output.This file is matched against the error almost literally, with the only exception being that the
@REDACTED@string can match anything, which is useful for non-deterministic errors.
Pinned dependencies are regularly updated automatically.
Releases are automatically created when the version field in Cargo.toml
is updated from a push to the main branch.