From 0ff2a895bbaab58e9b1a4eba7ddbc11f92d3ce91 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Fri, 26 Apr 2024 22:03:27 -0400 Subject: [PATCH] opencc: fix cross compilation --- pkgs/tools/text/opencc/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/text/opencc/default.nix b/pkgs/tools/text/opencc/default.nix index 53c36603afa2..5cc859474118 100644 --- a/pkgs/tools/text/opencc/default.nix +++ b/pkgs/tools/text/opencc/default.nix @@ -4,6 +4,7 @@ fetchFromGitHub, cmake, python3, + opencc, }: stdenv.mkDerivation rec { @@ -17,10 +18,14 @@ stdenv.mkDerivation rec { sha256 = "sha256-N7nazA0xoQ2ewOGDiJg1vBBYMdF1/qiCfNjG5CFFbuk="; }; - nativeBuildInputs = [ - cmake - python3 - ]; + nativeBuildInputs = + [ + cmake + python3 + ] + ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + opencc # opencc_dict + ]; meta = with lib; { homepage = "https://github.com/BYVoid/OpenCC";