summary refs log tree commit diff
path: root/pkgs/build-support/rust/import-cargo-lock.nix
Commit message (Collapse)AuthorAge
* importCargoLock: fix git dep config filelinsui2023-06-29
|
* rustPlatform.importCargoLock: fix [package] section handlingD Anzorge2023-04-29
| | | | | | | Members of the [package] table in Cargo.toml can be either subtables, or values like strings and bools. Python is happy to check for membership of "workspace" in a string, since Python strings are iterables, but if the value is a bool, Python will throw an exception.
* Merge staging-next into staginggithub-actions[bot]2023-03-26
|\
| * rustPlatform.importCargoLock: follow symlinks when copying treeYureka2023-03-26
| | | | | | | | | | | | fixes build when git dependencies contain symlinks into parent directory needed for libdeltachat
| * rustPlatform.importCargoLock: always fetch submodules when builtins.fetchGit ↵Yureka2023-03-26
| | | | | | | | is used
* | Merge branch 'staging-next' into stagingVladimír Čunát2023-03-21
|\|
| * rustPlatform.importCargoLock: add support for git dependencies that use ↵Winter2023-03-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | workspace inheritance Rust 1.64.0 added support for workspace inheritance, which allows for crates to inherit values such as dependency version constraints or package metadata information from their workspaces [0]. This works by having workspace members specify a value as a table, with `workspace` set to true. Thus, supporting this in importCargoLock is as simple as walking the crate's Cargo.toml, replacing inherited values with their workspace counterpart. This is also what a forthcoming Cargo release will do for `cargo vendor` [1], but we can get ahead of it ;) [0]: https://blog.rust-lang.org/2022/09/22/Rust-1.64.0.html#cargo-improvements-workspace-inheritance-and-multi-target-builds [1]: https://github.com/rust-lang/cargo/pull/11414
* | rustPlatform.importCargoLock: improved semantics for 'extraRegistries' optionLouis Blin2023-03-20
| | | | | | | | | | | | Clearer API following the recommendation on the pull request that introduced this option a few days ago: https://github.com/NixOS/nixpkgs/pull/221381#discussion_r1141226293
* | rustPlatform.importCargoLock: support extra registriesLouis Blin2023-03-16
|/ | | | | | This is useful to teach `importCargoLock` how to download crates from a registry other than crates.io. Specifically, we publish our own crates to an internal registry and this feature lets us pull from it seamlessly.
* rustPlatform.importCargoLock: passthru lockFilefigsoda2023-02-26
| | | | | | This is to make it possible to implement support for updating `Cargo.lock`s in nix-update by exposing the path to the `Cargo.lock` file
* rustPlatform.importCargoLock: add support for v1 lock filesWinter2023-02-26
| | | | | | | | | | | | v1 lock files (generated by default by Cargo versions 1.40 and below) use a single table, `metadata`, to store the checksums of packages. The primary motivation for doing this now is that we're considering vendoring all Cargo lock files in Nixpkgs, some packages still use it (e.g. cargo-asm), and adding support for it doesn't increase the complexity of the function. No matter the outcome of the vendoring discussion, this is a nice thing to have because Cargo still supports v1 lock files.
* rustPlatform.importCargoLock: pass allRefs to builtins.fetchGit (#211298)Yureka2023-01-18
|
* rustPlatform.importCargoLock: add allowBuiltinFetchGit optionfigsoda2022-12-13
|
* rust: fix importCargoLock for repositories without toplevel Cargo.tomlsohalt2022-03-17
| | | | | | | Some crates do not have a Cargo.toml at the top-level, but only in nested directories. Before this change importCargoLock used to fail with: error: manifest path `/nix/store/some-store-path/Cargo.toml` does not exist
* rust: find nested packages in git repositoriesStefan Junker2021-10-24
| | | | | | | this mimics the heuristic cargo uses for finding crates in their git repositories ([cargo-issue-1462]). [cargo-issue-1462]: https://github.com/rust-lang/cargo/issues/1462
* Merge pull request #137395 from dermetfan/cargo-lock-restrictedDaniël de Kok2021-09-20
|\ | | | | importCargoLock: introduce alternative parameter `lockFileContents`
| * importCargoLock: introduce alternative parameter `lockFileContents`Robin Stumm2021-09-20
| | | | | | | | | | | | | | | | | | In restricted mode (and therefore with flakes) `builtins.readFile` may not be the result of `builtins.toFile`, making it impossible to use a generated lockFile (with or without IFD), and thereby causing evaluation to fail if `system != builtins.currentSystem` on Hydra so the jobs are not delegated to eligible build machines that support that system. This is done in a way that avoids rebuilds.
* | importCargoLock: git deps with rev, branch or tagYureka2021-09-10
|/ | | | | Previously importCargoLog only recognized git dependencies with `rev =`. This adds support for git dependencies with `branch =` or `tag =`.
* rustPlatform.importCargoLock: add an assert for old Cargo.locksRomanos Skiadas2021-07-18
| | | | | | | | | | | | | | | near the end of 2019, the default Cargo.lock format was changed to [[package]] checksum = ... This is what importCargoLock assumes. If the crate had not been `cargo update`'d with a more recent toolchain than the one with the new format as default, importCargoLock would fail when trying to access pkg.checksum. I ran into such a case (shamefully, in my own crate) and it took me a while to figure out what was going on, so here is an assert with a more user friendly message and a hint.
* rustPlatform.importCargoLock: initDaniël de Kok2021-05-28
This function can be used to create an output path that is a cargo vendor directory. In contrast to e.g. fetchCargoTarball all the dependent crates are fetched using fixed-output derivations. The hashes for the fixed-output derivations are gathered from the Cargo.lock file. Usage is very simple, e.g.: importCargoLock { lockFile = ./Cargo.lock; } would use the lockfile from the current directory. The implementation of this function is based on Eelco Dolstra's import-cargo: https://github.com/edolstra/import-cargo/blob/master/flake.nix Compared to upstream: - We use fetchgit in place of builtins.fetchGit. - Sync to current cargo vendoring.