crane/lib
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
..
setupHooks installCargoArtifactsHook: allow specifying additional zstd args (#450) 2023-11-05 20:34:43 +00:00
buildDepsOnly.nix force buildDepsOnly to produce out only (#493) 2024-01-27 17:52:30 +00:00
buildPackage.nix installCargoArtifactsHook: change default installation mode to use-zstd (#442) 2023-10-20 22:28:41 +00:00
buildTrunkPackage.nix buildTrunkPackage: Add "wasm-bindgen-cli" argument (#363) 2023-12-20 08:24:53 -08:00
cargoAudit.nix cargoAudit: ignore yanked crates by default (#423) 2023-10-14 21:50:48 +00:00
cargoBuild.nix various: change cargoExtraArgs defaults to include --locked (#373) 2023-08-27 19:17:58 +00:00
cargoClippy.nix various: change cargoExtraArgs defaults to include --locked (#373) 2023-08-27 19:17:58 +00:00
cargoDeny.nix chore: clean up some dead code warnings (#449) 2023-11-05 18:42:08 +00:00
cargoDoc.nix cargoDoc: do not install cargo artifacts by default (#381) 2023-09-03 10:29:13 -07:00
cargoFmt.nix cargoFmt: use mkCargoDerivation instead of cargoBuild 2022-10-09 09:40:53 -10:00
cargoLlvmCov.nix various: change cargoExtraArgs defaults to include --locked (#373) 2023-08-27 19:17:58 +00:00
cargoNextest.nix Add workaround for cargo-nextest bug (#376) 2023-08-30 23:44:00 +00:00
cargoTarpaulin.nix fix #404 - lib/cargoTarpaulin: lowercase --out xml argument (#405) 2023-10-01 11:22:09 -07:00
cargoTest.nix various: change cargoExtraArgs defaults to include --locked (#373) 2023-08-27 19:17:58 +00:00
cleanCargoSource.nix Add cleanCargoSource and filterCargoSources (#110) 2022-09-21 01:27:47 +00:00
cleanCargoToml.nix Keep "resolver" when cleaning Cargo.toml (#327) 2023-05-18 21:03:02 -07:00
crateNameFromCargoToml.nix crateNameFromCargoToml: add hint for finding the source of the warning (#429) 2023-10-15 21:56:40 +00:00
default.nix vendorCargoDeps: manually splice packages to avoid cross build issues (#507) 2024-01-28 19:08:44 +00:00
devShell.nix devShell: add clippy and rustfmt from the current toolchain (#432) 2023-10-17 00:24:15 +00:00
downloadCargoPackage.nix vendorCargoDeps: manually splice packages to avoid cross build issues (#507) 2024-01-28 19:08:44 +00:00
downloadCargoPackageFromGit.nix vendorCargoDeps: manually splice packages to avoid cross build issues (#507) 2024-01-28 19:08:44 +00:00
filterCargoSources.nix Add cleanCargoSource and filterCargoSources (#110) 2022-09-21 01:27:47 +00:00
findCargoFiles.nix Eliminate dead code (#148) 2022-10-23 23:20:22 +00:00
internalCrateNameFromCargoToml.nix Add path as a convenience wrapper around builtins.path (#273) 2023-03-19 20:57:15 -07:00
mkCargoDerivation.nix mkCargoDerivation: replace Cargo.lock with contents of cargoLock (#425) 2023-10-15 01:42:24 +00:00
mkDummySrc.nix vendorCargoDeps: manually splice packages to avoid cross build issues (#507) 2024-01-28 19:08:44 +00:00
path.nix Add path as a convenience wrapper around builtins.path (#273) 2023-03-19 20:57:15 -07:00
registryFromDownloadUrl.nix Natively support sparse registries (#324) 2023-06-13 02:03:18 +00:00
registryFromGitIndex.nix Run nixpkgs-fmt 2022-11-20 16:28:49 -08:00
registryFromSparse.nix Natively support sparse registries (#324) 2023-06-13 02:03:18 +00:00
urlForCargoPackage.nix Natively support sparse registries (#324) 2023-06-13 02:03:18 +00:00
vendorCargoDeps.nix allow to pass outputHashes to crane (#266) 2023-09-22 04:08:53 +00:00
vendorCargoRegistries.nix vendorCargoDeps: manually splice packages to avoid cross build issues (#507) 2024-01-28 19:08:44 +00:00
vendorGitDeps.nix vendorCargoDeps: manually splice packages to avoid cross build issues (#507) 2024-01-28 19:08:44 +00:00
vendorMultipleCargoDeps.nix vendorCargoDeps: manually splice packages to avoid cross build issues (#507) 2024-01-28 19:08:44 +00:00
writeTOML.nix vendorCargoDeps: manually splice packages to avoid cross build issues (#507) 2024-01-28 19:08:44 +00:00