about summary refs log tree commit diff
path: root/pkgs/sternenseemann/default.nix
diff options
context:
space:
mode:
authorsternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-03-18 15:14:37 +0100
committersternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-03-18 15:14:37 +0100
commit88e0867d362a836eca870b0efecbefa57069fad5 (patch)
treec93f585a755eb520647218a6a950b7de9c7add10 /pkgs/sternenseemann/default.nix
parent06b78c72027ed680f9e8e1e59814dc300b83f8c3 (diff)
pkgs/sternenseemann/nix-env-diff: utility for comparing nix-env evals
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.
Diffstat (limited to 'pkgs/sternenseemann/default.nix')
-rw-r--r--pkgs/sternenseemann/default.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkgs/sternenseemann/default.nix b/pkgs/sternenseemann/default.nix
index e0c1bb16..ce2e47cd 100644
--- a/pkgs/sternenseemann/default.nix
+++ b/pkgs/sternenseemann/default.nix
@@ -35,6 +35,7 @@ let
 
   rust = callPackage ./rust {
     inherit (profpatsch)
+      writeRustSimpleBin
       writeRustSimpleLib
       testRustSimple
       ;
@@ -84,6 +85,7 @@ lib.fix (self: {
 
   inherit (rust)
     temp
+    nix-env-diff
     ;
 
   # don't bother hydra with trivial text substitution