shell.nix: use rustPlaform from <nix-scripts> by default

Fixes Gitea issue #25
This commit is contained in:
Astro 2020-12-13 20:42:29 +01:00
parent c3dd03dcf3
commit 7a28cb1cd4

View File

@ -1,10 +1,16 @@
{ mozillaOverlay ? builtins.fetchTarball "https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz" { mozillaOverlay ? builtins.fetchTarball "https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz",
latestRustNightly ? false,
}: }:
let let
pkgs = import <nixpkgs> { pkgs = import <nixpkgs> {
overlays = [ (import mozillaOverlay) ]; overlays = [ (import mozillaOverlay) ];
}; };
rust = pkgs.rustChannelOfTargets "nightly" null [ "thumbv7em-none-eabihf" ]; rust =
if latestRustNightly
then pkgs.rustChannelOfTargets "nightly" null [ "thumbv7em-none-eabihf" ]
else (pkgs.recurseIntoAttrs (
pkgs.callPackage (import <nix-scripts/stm32/rustPlatform.nix>) {}
)).rust.cargo;
in in
pkgs.mkShell { pkgs.mkShell {
name = "thermostat-env"; name = "thermostat-env";