From f0100c6fa7095afdacd956b6f616997ef5e5565e Mon Sep 17 00:00:00 2001 From: Johannes Maier Date: Fri, 10 Jun 2022 23:42:22 +0200 Subject: [PATCH] doc/contributing: replace outdated 'nix run' commands Use `nix-shell` instead, but also give an example of the correct flakes version of the commands. --- .../submitting-changes.chapter.md | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/doc/contributing/submitting-changes.chapter.md b/doc/contributing/submitting-changes.chapter.md index 471e45d7dfb3..d1aa701f0b35 100644 --- a/doc/contributing/submitting-changes.chapter.md +++ b/doc/contributing/submitting-changes.chapter.md @@ -167,24 +167,30 @@ Packages with automated tests are much more likely to be merged in a timely fash ### Tested compilation of all pkgs that depend on this change using `nixpkgs-review` {#submitting-changes-tested-compilation} -If you are updating a package’s version, you can use nixpkgs-review to make sure all packages that depend on the updated package still compile correctly. The `nixpkgs-review` utility can look for and build all dependencies either based on uncommited changes with the `wip` option or specifying a github pull request number. +If you are updating a package’s version, you can use `nixpkgs-review` to make sure all packages that depend on the updated package still compile correctly. The `nixpkgs-review` utility can look for and build all dependencies either based on uncommitted changes with the `wip` option or specifying a GitHub pull request number. -review changes from pull request number 12345: +Review changes from pull request number 12345: ```ShellSession -nix run nixpkgs.nixpkgs-review -c nixpkgs-review pr 12345 +nix-shell -p nixpkgs-review --run "nixpkgs-review pr 12345" ``` -review uncommitted changes: +Alternatively, with flakes (and analogously for the other commands below): ```ShellSession -nix run nixpkgs.nixpkgs-review -c nixpkgs-review wip +nix run nixpkgs#nixpkgs-review -- pr 12345 ``` -review changes from last commit: +Review uncommitted changes: ```ShellSession -nix run nixpkgs.nixpkgs-review -c nixpkgs-review rev HEAD +nix-shell -p nixpkgs-review --run "nixpkgs-review wip" +``` + +Review changes from last commit: + +```ShellSession +nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD" ``` ### Tested execution of all binary files (usually in `./result/bin/`) {#submitting-changes-tested-execution}