diff --git a/default.nix b/default.nix index def86d6..1bbdc53 100644 --- a/default.nix +++ b/default.nix @@ -1,18 +1,13 @@ { # Use master branch of the overlay by default mozillaOverlay ? import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz), - # This is needed when nix-build is run with option - # `restrict-eval`. Setting this flag to `true` causes the - # rustPlatform to be generated from the bundled - # `channel-rust-nightly.toml`. By default (`false`) the - # mozillaOverlay fetches the latest manifest. - rustRestrictedManifest ? false, pkgs ? import { overlays = [ mozillaOverlay ]; }, + rustManifest ? builtins.fetchurl "https://static.rust-lang.org/dist/channel-rust-nightly.toml" }: with pkgs; let rustPlatform = recurseIntoAttrs (callPackage (import ./nix/rustPlatform.nix) { - restrictedManifest = rustRestrictedManifest; + inherit rustManifest; }); adc2tcp = callPackage (import ./nix/adc2tcp.nix) { inherit rustPlatform; }; openocd = callPackage (import ./nix/openocd.nix) {}; diff --git a/nix/rustPlatform.nix b/nix/rustPlatform.nix index 9758dba..4a9c8a2 100644 --- a/nix/rustPlatform.nix +++ b/nix/rustPlatform.nix @@ -1,7 +1,7 @@ { recurseIntoAttrs, stdenv, lib, makeRustPlatform, rustChannelOfTargets, fetchurl, patchelf, - restrictedManifest ? false + rustManifest ? ./channel-rust-nightly.toml }: let @@ -13,7 +13,7 @@ let "thumbv7em-none-eabihf" ]; rustChannel = - lib.rustLib.fromManifestFile ./channel-rust-nightly.toml { + lib.rustLib.fromManifestFile rustManifest { inherit stdenv fetchurl patchelf; }; rust = diff --git a/release.nix b/release.nix index 624f6fc..7f31c3d 100644 --- a/release.nix +++ b/release.nix @@ -1,8 +1,13 @@ # For running on Hydra -{ pkgs ? import {}}: +{ pkgs ? import {}, + rustManifest ? ./nix/channel-rust-nightly.toml +}: { +channel = pkgs.releaseTools.channel { + name = "adc2tcp"; adc2tcp = pkgs.lib.hydraJob (import ./default.nix { + inherit rustManifest; mozillaOverlay = import ; rustRestrictedManifest = true; });