From 557f7572d8db3fb5ddddf5099c81725fb779edb7 Mon Sep 17 00:00:00 2001 From: K900 Date: Wed, 6 Apr 2022 00:49:09 +0300 Subject: [PATCH 1/2] rustfmt: stop pretending we're on nightly We're not, and starting with 1.59 the test behavior actually differs based on these env vars. --- pkgs/development/compilers/rust/rustfmt.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/rust/rustfmt.nix b/pkgs/development/compilers/rust/rustfmt.nix index b3191c242fea..f8ac8bf39df3 100644 --- a/pkgs/development/compilers/rust/rustfmt.nix +++ b/pkgs/development/compilers/rust/rustfmt.nix @@ -18,8 +18,8 @@ rustPlatform.buildRustPackage rec { # As of rustc 1.45.0, these env vars are required to build rustfmt (due to # https://github.com/rust-lang/rust/pull/72001) - CFG_RELEASE = "${rustPlatform.rust.rustc.version}-nightly"; - CFG_RELEASE_CHANNEL = "nightly"; + CFG_RELEASE = rustPlatform.rust.rustc.version; + CFG_RELEASE_CHANNEL = "stable"; meta = with lib; { description = "A tool for formatting Rust code according to style guidelines"; From d8710ac534fdb541314534c5ea68e1ddaad8573f Mon Sep 17 00:00:00 2001 From: K900 Date: Wed, 6 Apr 2022 01:14:21 +0300 Subject: [PATCH 2/2] indradb: fix build Was missing deps and hooks, now it at least compiles --- pkgs/development/tools/database/indradb/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/database/indradb/default.nix b/pkgs/development/tools/database/indradb/default.nix index f577963e8f4b..eefb0a32525f 100644 --- a/pkgs/development/tools/database/indradb/default.nix +++ b/pkgs/development/tools/database/indradb/default.nix @@ -3,6 +3,7 @@ , lib , rustPlatform , rustfmt +, protobuf }: let src = fetchFromGitHub { @@ -30,7 +31,9 @@ in buildAndTestSubdir = "server"; - nativeBuildInputs = [ rustfmt ]; + PROTOC = "${protobuf}/bin/protoc"; + + nativeBuildInputs = [ rustfmt rustPlatform.bindgenHook ]; # test rely on libindradb and it can't be found # failure at https://github.com/indradb/indradb/blob/master/server/tests/plugins.rs#L63 @@ -44,7 +47,9 @@ in cargoSha256 = "sha256-pxan6W/CEsOxv8DbbytEBuIqxWn/C4qT4ze/RnvESOM="; - nativeBuildInputs = [ rustfmt ]; + PROTOC = "${protobuf}/bin/protoc"; + + nativeBuildInputs = [ rustfmt rustPlatform.bindgenHook ]; buildAndTestSubdir = "client"; };