mirror of
https://github.com/nix-community/naersk
synced 2024-11-10 14:14:14 +00:00
94beb7a3ed
During compilation, we build two derivations - one for the dependencies and another for the user's crate itself. Passing `postInstall` to `buildPackage` pass-throughs it into both derivations, which is not what most users would probably expect. This commit adds `postInstall` as an explicit configuration option (so that it's neatly documented), zeroing it out for the dependencies-only derivation. I don't think there's any use case for something like `postInstallDeps`, so it's not introduced here. Closes https://github.com/nix-community/naersk/issues/237 |
||
---|---|---|
.. | ||
fast | ||
slow | ||
default.nix | ||
README.md |
Tests
This directory contains a handful of naersk's tests; you can run them locally with:
# First, you have to be in the naersk's top-level directory:
$ cd ..
# Then:
$ ./script/test
Caveats
Dynamically-built Git repositories
Some tests (their READMEs will tell you which ones) utilize dynamically-built
Git repositories (i.e. repositories built ad hoc during the testing through
pkgs.runCommand
).
Those tests' Cargo.toml
and Cargo.lock
contain variables (e.g. $depPath
,
$depRev
etc.) that are substituted through our Nix code before the test is
run.
Because of that, it's not possible to execute those tests via cargo test
(for
whatever the reason you'd like to).