| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
buildRustCrate: add host platform to rlib hash suffix
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|\| |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|\
| |
| | |
buildRustCrate: support cross compilation
|
| |
| |
| |
| | |
This fixes cross-compiling.
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
| |
This enables short argument attrsets similar to fetchPypi:
src = fetchCrate {
inherit pname version;
sha256 = "02h8pikmk19ziqw9jgxxf7kjhnb3792vz9is446p1xfvlh4mzmyx";
};
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While the artifacts from `buildPhase` should be used for testing as
well, it should be avoided that those are modified during `checkPhase`.
This can happen if a package is built e.g. with special
`cargoBuildFlags` that don't apply to the `checkPhase`. In that case, a
binary would be installed into `$out` without those flags since
`checkPhase` overrides the binary in the `target`-directory.
This patch copies the state of `target/release` into a temporary
location at the end of the `buildPhase` and installs the results from
that temporary directory into `$out` while `checkPhase` can continue
using the configured build-dir.
cc #91689
Closes #93119
Closes #91191
|
|
|
|
|
|
|
| |
This reverts commit deb78151a9438fb202842d9dbe348365cfd767e0.
Mixing up two distinct phases of a derivation's build is not a good idea. See
also https://github.com/NixOS/nixpkgs/pull/91689#issuecomment-657813954.
|
|
|
|
|
|
|
|
|
| |
When features were supplied in cargoBuildFlags, the binaries were built
with these features enabled. Unless checking was disabled, `cargo test`
was executed without these build flags, meaning the binaries were
rebuilt and overwritten without the specified features.
Fix this bug by running tests after the installation phase.
|
|\
| |
| | |
buildRustCrate: set CARGO_FEATURE_* when running the build script
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Cargo sets `CARGO_FEATURE_*` for all features when running a build
script:
https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts
Some crates have build scripts (e.g. openblas-src) that rely on the
feature variables being properly set.
Since we now need several representations of features, this change
also updates `createFeatures` to be a list of features, rather than
`rustc` feature arguments. `configureCrate` and `buildCrate` then
build the required representations as-needed.
Fixes #68978
|
|\| |
|
| | |
|
|\| |
|
| | |
|
|\ \
| |/
|/|
| | |
...for rust-packages (into staging)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There are several tarballs (such as the `rust-lang/rust`-source) with a
`Cargo.toml` at root and several sub-packages (with their own Cargo.toml)
without using workspaces[1].
In such a case it's needed to move into a subdir to only build the
specified sub-package (e.g. `rustfmt` or `rsl`), however the artifacts
are at `/target` in the root-dir of the build environment. This breaks
the build since `buildRustPackage` searches for executables in `target`
(which is at the build-env's root) at the end of the `buildPhase`.
With the optional `buildAndTestSubdir`-argument, the builder moves into
the specified subdir using `pushd`/`popd` during `buildPhase` and
`checkPhase`.
Also moved the logic to find executables and libs to the end of the `buildPhase`
from a custom `postBuild`-hook to fix packages with custom `build`/`install`-procedures
such as `uutils-coreutils`.
[1] https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html
|
| | |
|
| |\
| | |
| | |
| | | |
Hydra nixpkgs: ?compare=1586582
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
This is done by gathering all binaries to install before running the
checkPhase.
|
| | |
| | |
| | |
| | |
| | |
| | | |
When running `cargo test --release`, the artifacts from `buildPhase`
will be reused here. Previously, most of the stuff had to be recompiled
without optimizations.
|
| |/
|/|
| |
| |
| |
| | |
* Add test case for include dir
* buildRustCrate: replace hyphen with underscore in env
This fixes a bug that prevents encoding_c from building.
|
|/
|
|
|
|
|
|
|
|
| |
If a user provides `nativeBuildInputs = [ llvmPackages.bintools ]` or any other
package containing a `${prefix}/bin/diff`, the builder could use it instead
of the standard unix `diff`, causing a build failure.
This updates the call to specify an abspath to `diff` and avoid reliance on `PATH`.
Resolves #87081
|
|\
| |
| | |
buildRustCrate: support proc-macro in default prelude
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
| |
I know, heretic, but...
I also know that this is not perfect but it is a good start, I think. It
would be nice if this were part of the automatic "nixdoc" function
reference. I'd like guidance if this should be part of the rust section
or something else.
|
|
|
|
|
| |
This will improve cross-compiling support by forcing
users to specify buildInputs/nativeBuildInputs correctly.
|
|
|
|
|
| |
...and remove superfluous dependency files (*.d).
...and copy dSYM directories on Mac OS when in release=false mode.
|
|
|
|
|
|
|
|
|
|
|
|
| |
As it turns out Darwin does most of the things differently then "normal"
systems. They are using a different shared library extension and require
an obscure commandline parameter that has to be added to every build
system out there. That issue seems to be with clang on Darwin as on
Linux that flag isn't required to build the very same tests (when using
clang).
After adjusting these two details the tests are running fine on the
darwin box that I was able to obtain.
|