about summary refs log tree commit diff
path: root/pkgs/applications/blockchains
diff options
context:
space:
mode:
authorfigsoda <figsoda@pm.me>2021-11-16 21:00:48 -0500
committerGitHub <noreply@github.com>2021-11-16 21:00:48 -0500
commit6ad04bcb7d3a198c63823e037138013503e089fd (patch)
tree21bc7ae1e598ae53e7758aaf0ec41156bdc749c3 /pkgs/applications/blockchains
parent141d3fc04ff684095d03675231ef6f102444f633 (diff)
parent0e9320dc5f2cf9914711ff44f1251a4c7bd0d30b (diff)
Merge pull request #146243 from figsoda/treewide-rust-feature
treewide: use buildFeatures and checkFeatures for rust packages
Diffstat (limited to 'pkgs/applications/blockchains')
-rw-r--r--pkgs/applications/blockchains/alfis/default.nix9
-rw-r--r--pkgs/applications/blockchains/openethereum/default.nix2
2 files changed, 4 insertions, 7 deletions
diff --git a/pkgs/applications/blockchains/alfis/default.nix b/pkgs/applications/blockchains/alfis/default.nix
index 0738661c05968..e1fd262eb7727 100644
--- a/pkgs/applications/blockchains/alfis/default.nix
+++ b/pkgs/applications/blockchains/alfis/default.nix
@@ -14,12 +14,6 @@ rustPlatform.buildRustPackage rec {
 
   cargoSha256 = "1n7kb1lyghpkgdgd58pw8ldvfps30rnv5niwx35pkdg74h59hqgj";
 
-  cargoBuildFlags = [ "--no-default-features" ]
-    ++ lib.optional withGui "--features webgui";
-
-  cargoTestFlags = [ "--no-default-features" ]
-    ++ lib.optional withGui "--features webgui";
-
   checkFlags = [
     # these want internet access, disable them
     "--skip=dns::client::tests::test_tcp_client"
@@ -30,6 +24,9 @@ rustPlatform.buildRustPackage rec {
   buildInputs = lib.optional (withGui && stdenv.isLinux) webkitgtk
     ++ lib.optionals (withGui && stdenv.isDarwin) [ Cocoa WebKit ];
 
+  buildNoDefaultFeatures = true;
+  buildFeatures = lib.optional withGui "webgui";
+
   postInstall = lib.optionalString (withGui && stdenv.isLinux) ''
     wrapProgram $out/bin/alfis \
       --prefix PATH : ${lib.makeBinPath [ zenity ]}
diff --git a/pkgs/applications/blockchains/openethereum/default.nix b/pkgs/applications/blockchains/openethereum/default.nix
index 39f35f211f903..79ab37c7adb5d 100644
--- a/pkgs/applications/blockchains/openethereum/default.nix
+++ b/pkgs/applications/blockchains/openethereum/default.nix
@@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec {
     ++ lib.optionals stdenv.isLinux [ systemd ]
     ++ lib.optionals stdenv.isDarwin [ darwin.Security ];
 
-  cargoBuildFlags = [ "--features final" ];
+  buildFeatures = [ "final" ];
 
   # Fix tests by preventing them from writing to /homeless-shelter.
   preCheck = ''