aboutsummaryrefslogtreecommitdiff
path: root/pkgs/build-support/rust (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #105305 from lopsided98/build-rust-crate-platform-hashJohn Ericson2020-11-291-1/+5
|\ | | | | buildRustCrate: add host platform to rlib hash suffix
| * buildRustCrate: add host platform to rlib hash suffixBen Wolsieffer2020-11-281-1/+5
| |
* | add sysroot lockfile update script then run itAaron Janse2020-10-174-11/+42
| |
* | NEEDS REVIEW: enable sysroot differentlyAaron Janse2020-10-171-4/+4
| |
* | enforce noCheck when useSysrootAaron Janse2020-10-171-0/+4
| |
* | minor clean upAaron Janse2020-10-171-2/+3
| |
* | fix whitespaceAaron Janse2020-10-151-1/+1
| |
* | parameterize rustcSrcAaron Janse2020-10-151-1/+1
| |
* | use rustcSrcAaron Janse2020-10-141-17/+11
| |
* | rust: Add support for managing target JSON in NixJohn Ericson2020-10-144-6/+6
| |
* | Merge remote-tracking branch 'upstream/master' into aj-rust-custom-targetJohn Ericson2020-10-143-34/+40
|\|
| * buildRustCrateTests: support cross-compilationBen Wolsieffer2020-09-291-20/+33
| |
| * buildRustCrate: fix target config environment variables on 32-bit ARMBen Wolsieffer2020-09-292-14/+7
| |
* | fix some whitespaceAaron Janse2020-10-121-1/+1
| |
* | fix compile errorAaron Janse2020-10-121-1/+3
| |
* | makeRustPlatform: support custom targetsAaron Janse2020-10-084-7/+137
|/
* Merge pull request #99050 from lopsided98/buildrustcrate-crossJohn Ericson2020-09-292-13/+29
|\ | | | | buildRustCrate: support cross compilation
| * defaultCrateOverrides: move pkgconfig to nativeBuildInputsBen Wolsieffer2020-09-281-10/+20
| | | | | | | | This fixes cross-compiling.
| * buildRustCrate: support cross compilationBen Wolsieffer2020-09-281-3/+9
| |
* | buildRustPackage: support setting test-threadszowoq2020-09-241-1/+4
| |
* | firmware-manager: Init at 0.1.1Shea Levy2020-09-231-4/+4
|/
* buildSupport.rust: fix typo in verifyCargoDeps message (#97058)Evan Stoll2020-09-051-1/+1
|
* fetchCrate: accept pname besides crateNameDaniël de Kok2020-08-281-2/+5
| | | | | | | | | This enables short argument attrsets similar to fetchPypi: src = fetchCrate { inherit pname version; sha256 = "02h8pikmk19ziqw9jgxxf7kjhnb3792vz9is446p1xfvlh4mzmyx"; };
* buildRustPackage: add support for parallel buildMario Rodas2020-08-161-2/+2
|
* buildRustCrate: editorconfig fixeszowoq2020-08-094-13/+13
|
* rustPlatform: don't install artifacts modified by `checkPhase`Maximilian Bosch2020-07-151-4/+7
| | | | | | | | | | | | | | | | | | | 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
* Revert "buildRustPackage: fix cargoBuildFlags"Maximilian Bosch2020-07-141-1/+1
| | | | | | | 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.
* buildRustPackage: fix cargoBuildFlagsFlakebi2020-07-031-1/+1
| | | | | | | | | 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.
* Merge pull request #90193 from danieldk/build-rs-feature-envAndreas Rammhold2020-06-164-11/+58
|\ | | | | buildRustCrate: set CARGO_FEATURE_* when running the build script
| * buildRustCrate: set CARGO_FEATURE_* when running the build scriptDaniël de Kok2020-06-134-11/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge staging-next into stagingFrederik Rietdijk2020-06-081-1/+2
|\|
| * rustPlatform: fix cross-compiling by using native diffhyperfekt2020-06-081-1/+2
| |
* | Merge staging-next into stagingFrederik Rietdijk2020-06-051-0/+1
|\|
| * buildRustPackage: add documentation on how to create cargo.lock patchesJörg Thalheim2020-06-051-0/+1
| |
* | Merge #82342: rustPlatform: increase build-speed of `checkPhase`Vladimír Čunát2020-06-051-16/+34
|\ \ | |/ |/| | | ...for rust-packages (into staging)
| * rustPlatform: add `buildAndTestSubdir`-argumentMaximilian Bosch2020-05-131-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * rustPlatform: make it possible to override the profile for `cargo test`Maximilian Bosch2020-05-131-1/+2
| |
| * Merge branch 'staging-next' into PR 82342Vladimír Čunát2020-05-111-2/+16
| |\ | | | | | | | | | Hydra nixpkgs: ?compare=1586582
| * | rustPlatform: fix logMaximilian Bosch2020-05-081-1/+1
| | |
| * | rustPlatform: don't install test executablesMaximilian Bosch2020-05-081-5/+12
| | | | | | | | | | | | | | | This is done by gathering all binaries to install before running the checkPhase.
| * | rustPlatform: increase build-speed of `checkPhase` for rust-packagesMaximilian Bosch2020-05-061-11/+13
| | | | | | | | | | | | | | | | | | When running `cargo test --release`, the artifacts from `buildPhase` will be reused here. Previously, most of the stuff had to be recompiled without optimizations.
* | | buildRustCrate: Replace hyphen with underscore in env variables (#88054)Michael Howell2020-05-262-2/+36
| |/ |/| | | | | | | | | * Add test case for include dir * buildRustCrate: replace hyphen with underscore in env This fixes a bug that prevents encoding_c from building.
* | rustPlatform: fix bug with ambiguous diff toolBenjamin Hipple2020-05-061-2/+16
|/ | | | | | | | | | 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
* Merge pull request #85172 from andir/buildRustCrate-proc-macroAndreas Rammhold2020-04-132-0/+15
|\ | | | | buildRustCrate: support proc-macro in default prelude
| * buildRustCrate: support proc-macro in default preludeAndreas Rammhold2020-04-132-0/+15
| |
* | buildRustCrate: Support versioned crate renamesPeter Kolloch2020-04-102-4/+99
| |
* | buildRustCrate: Document parametersPeter Kolloch2020-04-101-5/+89
|/ | | | | | | | | 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.
* buildRustPackage: enable strictDepsJörg Thalheim2020-03-291-0/+2
| | | | | This will improve cross-compiling support by forcing users to specify buildInputs/nativeBuildInputs correctly.
* buildRustCrate: Add tests for checking files in outputs.Peter Kolloch2020-03-293-9/+133
| | | | | ...and remove superfluous dependency files (*.d). ...and copy dSYM directories on Mac OS when in release=false mode.
* buildRustCrateTests: Fix link order test on darwinAndreas Rammhold2020-03-281-5/+20
| | | | | | | | | | | | 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.