diff options
author | Vincent Ambo <tazjin@gmail.com> | 2018-05-01T21·34+0200 |
---|---|---|
committer | Vincent Ambo <github@tazj.in> | 2018-05-01T22·33+0200 |
commit | c07b1be3be516454afd77f00ab4c685a4b80349f (patch) | |
tree | 303ce37d0e6ad1abce61654a6e001fc1943a6f29 | |
parent | 40fb4ebbb9c88754bafc9b115841712ad023d099 (diff) |
fix(build): Apply a workaround for building Comrak in Nix
Carnix can not be configured to not build a dependency's binaries (even if relevant features are disabled), but Comrak's binary can by default not be built in Carnix because it attempts to read a Cargo-provided environment variable at compile time. This works around the issue by "faking" the environment variable, which is less than ideal but works.
-rw-r--r-- | default.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/default.nix b/default.nix index 6430b87e6152..e907c05967f0 100644 --- a/default.nix +++ b/default.nix @@ -2336,11 +2336,11 @@ rec { unicode_width_0_1_4.default = true; vec_map_0_8_0.default = true; }) [ atty_0_2_10_features bitflags_1_0_3_features strsim_0_7_0_features textwrap_0_9_0_features unicode_width_0_1_4_features vec_map_0_8_0_features ansi_term_0_11_0_features ]; - comrak_0_2_9 = { features?(comrak_0_2_9_features {}) }: comrak_0_2_9_ { + comrak_0_2_9 = { features?(comrak_0_2_9_features {}) }: (comrak_0_2_9_ { dependencies = mapFeatures features ([ entities_1_0_1 lazy_static_1_0_0 pest_1_0_6 pest_derive_1_0_7 regex_0_2_11 twoway_0_1_8 typed_arena_1_3_0 unicode_categories_0_1_1 ] ++ (if features.comrak_0_2_9.clap or false then [ clap_2_31_2 ] else [])); features = mkFeatures (features.comrak_0_2_9 or {}); - }; + }).overrideAttrs (oldAttrs: rec { CARGO_PKG_DESCRIPTION = "dummy"; }); comrak_0_2_9_features = f: updateFeatures f (rec { clap_2_31_2.default = true; comrak_0_2_9.clap = |