allow disabling default features via override

This commit is contained in:
Charles Hall 2024-04-24 19:51:19 -07:00 committed by June
parent 67f9553790
commit 76ab8ca69b

View file

@ -10,6 +10,7 @@
, stdenv
# Options
, default_features ? true
, features ? []
, profile ? "release"
}:
@ -57,6 +58,9 @@ craneLib.buildPackage rec {
++ lib.optionals stdenv.isDarwin [ libiconv ];
cargoExtraArgs = ""
+ lib.optionalString
(!default_features)
"--no-default-features "
+ lib.optionalString
(features != [])
"--features " + (builtins.concatStringsSep "," features);