| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
testRustSimple wouldn’t work with all the rust functions, so let’s
just use it internally and expose the tests via the conventional
`doCheck` attribute instead.
|
|
|
|
| |
https://youtu.be/LB8bhHyPLgk?t=418
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This means we don't need the -common machinery anymore and can remove
the -tests attribute altogether.
|
|
The crate implements a safe wrapper around mkdtemp(3) and mkstemp(3)
which provide decent temporary file and directory creation. The key
feature we provide is that we wrap the resulting path in a TempFile /
TempDir struct. This allows us to implement the Drop trait such that the
temporary directory / file is automatically deleted when the value goes
out of scope in Rust which saves the programmer from cleaning up
temporary artifacts themselves.
The API is indeed very tiny currently, only implementing creation and
AsRef<Path> which should allow all necessary path / file manipulation.
|