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