about summary refs log tree commit diff
path: root/pkgs/sternenseemann/rust/nix-env-diff.rs
Commit message (Collapse)AuthorAgeFilesLines
* pkgs/sternenseemann/nix-env-diff: I am stupidsternenseemann2021-03-181-1/+1
| | | | https://youtu.be/LB8bhHyPLgk?t=418
* pkgs/sternenseemann/nix-env-diff: utility for comparing nix-env evalssternenseemann2021-03-181-0/+163
nix-env-diff is a tiny utility which parses and compares the output of `nix-env -qaP --out-path`, printing all changed and added out paths (or attributes if desired). This facilitates a simple way to determine rebuilds or changed reverse dependencies when working on nixpkgs in a similar way as nixpkgs-review and ofborg do it. Both the new evaluation and the base evaluation to compare against have to be created manually using nix-env, which in turn also allows considering attribute sets that are normally not evaluated do to missing `lib.recurseIntoAttrs`. As an example, here is an example building all changed attributes in `ocaml-ng.ocamlPackages_4_12`: ``` nix-env -qaP -A ocaml-ng.ocamlPackages_4_12 --out-path -f . \ | nix-env-diff --attrs ./base-ocamlPackages_4_12 \ | xargs -n 1 -P 4 nix-instantiate --quiet -A \ | xargs nix-store --realise --builders 'ssh://edwin' ``` `./base-ocamlPackages_4_12` contains the result of the `nix-env` invocation executed on the master branch.