From 428ce942a7cc7be8de1a4681d8a91a1e4e37d2b6 Mon Sep 17 00:00:00 2001 From: aleksana Date: Tue, 23 Dec 2025 17:17:01 +0800 Subject: [PATCH] opencc: fix build with gcc 15 --- pkgs/by-name/op/opencc/package.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgs/by-name/op/opencc/package.nix b/pkgs/by-name/op/opencc/package.nix index a3b116d34b8d..820da80aa8dd 100644 --- a/pkgs/by-name/op/opencc/package.nix +++ b/pkgs/by-name/op/opencc/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch, cmake, python3, opencc, @@ -20,6 +21,18 @@ stdenv.mkDerivation rec { sha256 = "sha256-JBTegQs9ALp4LdKKYMNp9GYEgqR9O8IkX6LqatvaTic="; }; + patches = [ + # fix build with gcc15 by adding cstdint include + (fetchpatch { + url = "https://github.com/BYVoid/OpenCC/commit/3d3adca2dbee0da7d33eb3c3563299fcbd2255e3.patch"; + hash = "sha256-4ZQxVnEHnNBKtEu0IPnSC/ZX7gm2cJ1Ss00PvCZr5P8="; + }) + (fetchpatch { + url = "https://github.com/BYVoid/OpenCC/commit/72cae18cfe4272f2b11c9ec1c44d6af7907abcab.patch"; + hash = "sha256-Cd95AsW/tLk2l8skxqfEfQUm0t23G4ocoirauwMbuwk="; + }) + ]; + nativeBuildInputs = [ cmake python3