Make sure naersk is using the correct toolchain

This commit is contained in:
Erwin Boskma 2022-01-14 10:43:59 +01:00
parent 727a05c8c1
commit 7a25741c8a
Signed by: erwin
GPG key ID: 270B20D17394F7E5

View file

@ -20,9 +20,11 @@
overlays = [ (import rust-overlay) ]; overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs { inherit system overlays; }; pkgs = import nixpkgs { inherit system overlays; };
naersk-lib = pkgs.callPackage naersk { }; naersk-lib = pkgs.callPackage naersk { };
rustToolchain =
(pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml);
buildInputs = [ buildInputs = [
(pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml) rustToolchain
pkgs.openssl pkgs.openssl
]; ];
nativeBuildInputs = [ nativeBuildInputs = [
@ -30,7 +32,10 @@
]; ];
in in
rec { rec {
packages.ha-now-playing = naersk-lib.buildPackage packages.ha-now-playing = (naersk-lib.override {
cargo = rustToolchain;
rustc = rustToolchain;
}).buildPackage
{ {
inherit buildInputs nativeBuildInputs; inherit buildInputs nativeBuildInputs;
pname = "ha-now-playing"; pname = "ha-now-playing";