mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
prevent bindgen and dependents from building twice
See also <https://crane.dev/faq/rebuilds-bindgen.html>.
This commit is contained in:
parent
21a4b9e5a1
commit
17eb354590
1 changed files with 8 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
# Dependencies (keep sorted)
|
# Dependencies (keep sorted)
|
||||||
{ craneLib
|
{ craneLib
|
||||||
, inputs
|
, inputs
|
||||||
|
, jq
|
||||||
, lib
|
, lib
|
||||||
, pkgsBuildHost
|
, pkgsBuildHost
|
||||||
, rocksdb
|
, rocksdb
|
||||||
|
|
@ -21,6 +22,7 @@ let
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
NIX_OUTPATH_USED_AS_RANDOM_SEED = "randomseed";
|
||||||
CARGO_PROFILE = profile;
|
CARGO_PROFILE = profile;
|
||||||
ROCKSDB_INCLUDE_DIR = "${rocksdb'}/include";
|
ROCKSDB_INCLUDE_DIR = "${rocksdb'}/include";
|
||||||
ROCKSDB_LIB_DIR = "${rocksdb'}/lib";
|
ROCKSDB_LIB_DIR = "${rocksdb'}/lib";
|
||||||
|
|
@ -63,6 +65,12 @@ let
|
||||||
# weirdness", pkgs.rustPlatform.bindgenHook on its own doesn't quite do the
|
# weirdness", pkgs.rustPlatform.bindgenHook on its own doesn't quite do the
|
||||||
# right thing here.
|
# right thing here.
|
||||||
pkgsBuildHost.rustPlatform.bindgenHook
|
pkgsBuildHost.rustPlatform.bindgenHook
|
||||||
|
|
||||||
|
# We don't actually depend on `jq`, but crane's `buildPackage` does, but
|
||||||
|
# its `buildDepsOnly` doesn't. This causes those two derivations to have
|
||||||
|
# differing values for `NIX_CFLAGS_COMPILE`, which contributes to spurious
|
||||||
|
# rebuilds of bindgen and its depedents.
|
||||||
|
jq
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue