rustPlatform.importCargoLock: fix workspace_root detection#276072
Merged
K900 merged 1 commit intoNixOS:masterfrom Jan 1, 2024
Merged
rustPlatform.importCargoLock: fix workspace_root detection#276072K900 merged 1 commit intoNixOS:masterfrom
K900 merged 1 commit intoNixOS:masterfrom
Conversation
Prior to this change, the `importCargoLock` git dependency builder assumed that the workspace root that needed to be passed to `replace-workspace-values` will always be the root directory of the git repository. This is not always the case as independent workspace roots may be used from subdirectories, and packages be referenced via paths. An example of this is [1], where the `iced` subdirectory is its own independent workspace, and workspace values for packages within it should be pulled from the `iced` subdirectory as the workspace root, not from the top-level of the fetched repository. [1]: https://github.com/pop-os/libcosmic/blob/b8f1a366dd030b90ed72e50f521e3da1d6a676ce/Cargo.toml
nbdd0121
approved these changes
Dec 26, 2023
Member
nbdd0121
left a comment
There was a problem hiding this comment.
I can confirm that jq -r .workspace_root gives the expected value, and with this PR cosmic-* is able to build.
13 tasks
Nexushunter
approved these changes
Dec 26, 2023
johnyob
added a commit
to jstz-dev/jstz
that referenced
this pull request
Jul 15, 2024
Due to a bug in `replace-workspace-values`, we can no-longer use a cargo git dependency for tezos/tezos. The issue is documented here: NixOS/nixpkgs#276072. To fix, we simply update nixpkgs.
johnyob
added a commit
to jstz-dev/jstz
that referenced
this pull request
Jul 15, 2024
Due to a bug in `replace-workspace-values`, we can no-longer use a cargo git dependency for tezos/tezos. The issue is documented here: NixOS/nixpkgs#276072. To fix, we simply update nixpkgs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
Prior to this change, the
importCargoLockgit dependency builder assumed that the workspace root that needed to be passed toreplace-workspace-valueswill always be the root directory of the git repositoryThis is not always the case as independent workspace roots may be used from subdirectories, and packages be referenced as dependencies via paths. An example of this is in libcosmic, where the
icedsubdirectory is its own independent workspace, and workspace values for packages within it should be pulled from theicedsubdirectory as the workspace root, not from the top-level of the fetched repositoryGiven the derivation I changed is not a FOD, I just did a
nixpkgs-reviewand compared with current Hydra failures to ensure there were no regressed buildsCloses #274490
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixpkgs-review
Result of
nixpkgs-reviewrun on x86_64-linux 14 packages marked as broken and skipped:
15 packages failed to build:
335 packages built:
Add a 👍 reaction to pull requests you find important.