diesel-cli: use buildFeatures
This commit is contained in:
parent
bd60edf470
commit
fdf41beab1
|
@ -21,9 +21,6 @@ assert lib.assertMsg (sqliteSupport == true || postgresqlSupport == true || mysq
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) optional optionals optionalString;
|
inherit (lib) optional optionals optionalString;
|
||||||
features = optional sqliteSupport "sqlite"
|
|
||||||
++ optional postgresqlSupport "postgres"
|
|
||||||
++ optional mysqlSupport "mysql";
|
|
||||||
in
|
in
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
|
@ -36,7 +33,6 @@ rustPlatform.buildRustPackage rec {
|
||||||
sha256 = "sha256-mRdDc4fHMkwkszY+2l8z1RSNMEQnrWI5/Y0Y2W+guQE=";
|
sha256 = "sha256-mRdDc4fHMkwkszY+2l8z1RSNMEQnrWI5/Y0Y2W+guQE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoBuildFlags = [ "--no-default-features" "--features" "${lib.concatStringsSep "," features}" ];
|
|
||||||
cargoSha256 = "sha256-sQ762Ss31sA5qALHzwkvwbfRXo00cCtqzQyoz3/zf6I=";
|
cargoSha256 = "sha256-sQ762Ss31sA5qALHzwkvwbfRXo00cCtqzQyoz3/zf6I=";
|
||||||
|
|
||||||
nativeBuildInputs = [ installShellFiles pkg-config ];
|
nativeBuildInputs = [ installShellFiles pkg-config ];
|
||||||
|
@ -48,6 +44,11 @@ rustPlatform.buildRustPackage rec {
|
||||||
++ optional postgresqlSupport postgresql
|
++ optional postgresqlSupport postgresql
|
||||||
++ optionals mysqlSupport [ mariadb zlib ];
|
++ optionals mysqlSupport [ mariadb zlib ];
|
||||||
|
|
||||||
|
buildNoDefaultFeatures = true;
|
||||||
|
buildFeatures = optional sqliteSupport "sqlite"
|
||||||
|
++ optional postgresqlSupport "postgres"
|
||||||
|
++ optional mysqlSupport "mysql";
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
runHook preCheck
|
runHook preCheck
|
||||||
'' + optionalString sqliteSupport ''
|
'' + optionalString sqliteSupport ''
|
||||||
|
|
Loading…
Reference in a new issue