From 7c1c5b4a62b6ce304186e2829099e4f9f9ee31d8 Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Sun, 16 Nov 2025 20:52:55 +0100 Subject: [PATCH] gopher64: fix build --- pkgs/by-name/go/gopher64/allow-unused-type.patch | 12 ++++++++++++ pkgs/by-name/go/gopher64/package.nix | 3 +++ 2 files changed, 15 insertions(+) create mode 100644 pkgs/by-name/go/gopher64/allow-unused-type.patch diff --git a/pkgs/by-name/go/gopher64/allow-unused-type.patch b/pkgs/by-name/go/gopher64/allow-unused-type.patch new file mode 100644 index 000000000000..655f6411e282 --- /dev/null +++ b/pkgs/by-name/go/gopher64/allow-unused-type.patch @@ -0,0 +1,12 @@ +diff --git a/src/device/cart.rs b/src/device/cart.rs +index 97bf09f..4406fec 100644 +--- a/src/device/cart.rs ++++ b/src/device/cart.rs +@@ -21,6 +21,7 @@ const JDT_EEPROM_16K: u16 = 0xc000; /* 16k EEPROM */ + const EEPROM_BLOCK_SIZE: usize = 8; + pub const EEPROM_MAX_SIZE: usize = 0x800; + ++#[allow(warnings)] + #[derive(serde::Serialize, serde::Deserialize)] + pub enum CicType { + CicNus6101, diff --git a/pkgs/by-name/go/gopher64/package.nix b/pkgs/by-name/go/gopher64/package.nix index 807002a700f9..ae604f8b3169 100644 --- a/pkgs/by-name/go/gopher64/package.nix +++ b/pkgs/by-name/go/gopher64/package.nix @@ -42,6 +42,9 @@ rustPlatform.buildRustPackage (finalAttrs: { # make the build script use the @GIT_REV@ string that will be substituted in the logic below ./set-git-rev.patch + + # enum CicType is not used, but dead code is treated as an error + ./allow-unused-type.patch ]; postPatch = ''