Commit Graph

9 Commits

Author SHA1 Message Date
Ivan Petkov
442a7a6152
crane-utils: bump dependencies (#609) 2024-05-04 23:12:35 +00:00
Ivan Petkov
1e44708c0b
chore: bump crane-utils deps (#580) 2024-04-05 20:48:03 +00:00
Ivan Petkov
f23ae17543
crane-utils: fix workspace dependency merge when it is not a table (#529) 2024-02-21 16:00:58 -08:00
Ivan Petkov
c5a3c5dac3
crane-utils: bump dependencies (#508) 2024-01-28 19:22:09 +00:00
Ivan Petkov
960d350770
vendorCargoDeps: manually splice packages to avoid cross build issues (#507)
* Source vendoring is passed as a standalone attribute to
  `mkCargoDerivation`, meaning it does not automagically get spliced
  with the correct local/cross system inputs (i.e. what would happen if
  it was a `depsBuildBuild` entry)
* To fix this we need to make sure that `vendorCargoDeps` and all of its
  transitive dependencies always use `runCommand` (and friends) from
  their `pkgsBuildBuild` equivalent. This should always be safe to do
  (even for cross-builds) since this amounts to building up a bunch of
  sources which will be read by the build system
* Unfortunately I had to manually specify `pkgsBuildBuild.whatever` in
  multiple places as I could not get things to work by messing with the
  `callPackage` definition. Perhaps we should be using
  `makeScopeWithSplicing'` instead of `makeScope` when constructing the
  library, but I couldn't get it working (and I couldn't find any decent
  docs on how to use it online) so this will make do for the time being.
2024-01-28 19:08:44 +00:00
Ivan Petkov
7814285d01
chore: bump all cargo deps (#504) 2024-01-27 03:58:59 +00:00
Ivan Petkov
159f71f4f0
craneUtils: build with rustPlatform (#431)
* This should hopefully result in fewer surprises if someone is using a
  really ancient toolchain for their code since we'll use whatever is in
  nixpkgs to build craneUtils instead
2023-10-17 00:12:57 +00:00
Ivan Petkov
6fd78bc66a
Add path as a convenience wrapper around builtins.path (#273) 2023-03-19 20:57:15 -07:00
Ivan Petkov
00564437f3
Properly handle workspace inheritance in git dependencies (#224)
Crates from git repos are vendored in a flattened directory where each crate shows up at the root of the vendor directory. Since the vendoring step effectively breaks workspace structures, any crates which use workspace inheritance (e.g. package.version.workspace = true will fail to resolve.

To work around this we inspect the crate's workspace manifest (if it exists) and attempt to manually merge the values while copying the contents to the vendor directory.
2023-01-21 16:46:32 -08:00