stub: update dependencies

Update nightly toolchain and UEFI dependencies. The latest crane
version comes with a bug where it fails to compile UEFI binaries.
This commit is contained in:
Julian Stecklina 2023-03-20 09:51:27 +01:00
parent dfa6c3db1f
commit 5a03bb751d
6 changed files with 34 additions and 16 deletions

View File

@ -14,11 +14,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1679272397, "lastModified": 1679285709,
"narHash": "sha256-4CeB4weE6bedPAjuszAftURWmtgR3aCds70YFk0bQ50=", "narHash": "sha256-oERwmwZPZ5BOqSv6cmcXfjIBPrFR6dp02oGE8mA+1n4=",
"owner": "ipetkov", "owner": "ipetkov",
"repo": "crane", "repo": "crane",
"rev": "77435dad14835fa2ac86490978e10618dc952593", "rev": "2552a2d1ccf33d43259a9e00f93dbacb9e6d6bed",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -243,11 +243,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1679192997, "lastModified": 1679279218,
"narHash": "sha256-OZxPSyEDJTy4IATwFxUGDEEUYL6ZkgKn2FhlRlcLE08=", "narHash": "sha256-vWUbkLgNaUo0TYi5BaboPTaB6IjoZPm+0y0SqLS54Jc=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "32e4b1bf80cf99b7c72d2892198d40558828e6a1", "rev": "c680a0a4144bb0931f6cebd601a3978bbafc4f64",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -92,6 +92,25 @@
inherit src; inherit src;
CARGO_BUILD_TARGET = target; CARGO_BUILD_TARGET = target;
inherit doCheck; inherit doCheck;
# Workaround for https://github.com/ipetkov/crane/issues/262.
dummyrs = pkgs.writeText "dummy.rs" ''
#![allow(unused)]
#![cfg_attr(
any(target_os = "none", target_os = "uefi"),
no_std,
no_main,
)]
#[cfg_attr(any(target_os = "none", target_os = "uefi"), panic_handler)]
fn panic(_info: &::core::panic::PanicInfo<'_>) -> ! {
loop {}
}
#[cfg_attr(any(target_os = "none", target_os = "uefi"), export_name = "efi_main")]
fn main() {}
'';
} // extraArgs; } // extraArgs;
cargoArtifacts = craneLib.buildDepsOnly commonArgs; cargoArtifacts = craneLib.buildDepsOnly commonArgs;

12
rust/stub/Cargo.lock generated
View File

@ -208,9 +208,9 @@ dependencies = [
[[package]] [[package]]
name = "uefi" name = "uefi"
version = "0.19.1" version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f5607fef843201070ed442fa257c7a944fae963fac7d4620612123192eb4d844" checksum = "ab39d5e7740f21ed4c46d6659f31038bbe3fe7a8be1f702d8a984348837c43b1"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"log", "log",
@ -221,9 +221,9 @@ dependencies = [
[[package]] [[package]]
name = "uefi-macros" name = "uefi-macros"
version = "0.10.0" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8099684193f2d99f7f130951f4054a1591ff7da370e2b33d7a71f0434920499" checksum = "e0caeb0e7b31b9f1f347e541106be10aa8c66c76fa722a3298a4cd21433fabd4"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -232,9 +232,9 @@ dependencies = [
[[package]] [[package]]
name = "uefi-services" name = "uefi-services"
version = "0.16.0" version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f75daa44f951cc1d9dc68d98cabc06ddbccc221d7bd21222271be5d7ac526a9d" checksum = "42d8ffbcc532083312224b4540737c1102ede6a81360fa9320a60deff329a3a1"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"log", "log",

View File

@ -5,8 +5,8 @@ edition = "2021"
publish = false publish = false
[dependencies] [dependencies]
uefi = { version = "0.19.1", default-features = false, features = [ "alloc", "global_allocator", "unstable" ] } uefi = { version = "0.20.0", default-features = false, features = [ "alloc", "global_allocator", "unstable" ] }
uefi-services = { version = "0.16.0", default-features = false, features = [ "panic_handler", "logger" ] } uefi-services = { version = "0.17.0", default-features = false, features = [ "panic_handler", "logger" ] }
goblin = { version = "0.6.1", default-features = false, features = [ "pe64", "alloc" ]} goblin = { version = "0.6.1", default-features = false, features = [ "pe64", "alloc" ]}
# Even in debug builds, we don't enable the debug logs, because they generate a lot of spam from goblin. # Even in debug builds, we don't enable the debug logs, because they generate a lot of spam from goblin.

View File

@ -1,4 +1,4 @@
[toolchain] [toolchain]
channel = "nightly-2022-11-21" channel = "nightly-2023-03-10"
components = [ "rust-src" ] components = [ "rust-src" ]
targets = [ "x86_64-unknown-uefi" ] targets = [ "x86_64-unknown-uefi" ]

View File

@ -1,6 +1,5 @@
#![no_main] #![no_main]
#![no_std] #![no_std]
#![feature(abi_efiapi)]
#![feature(negative_impls)] #![feature(negative_impls)]
#![deny(unsafe_op_in_unsafe_fn)] #![deny(unsafe_op_in_unsafe_fn)]