Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
57 lines
1.3 KiB
Nix
57 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
cmake,
|
|
sqlite,
|
|
corrosion,
|
|
rustPlatform,
|
|
cargo,
|
|
rustc,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "libchewing";
|
|
version = "0.9.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "chewing";
|
|
repo = "libchewing";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-5aeAsvTiUMTm+ibNfJI57rzSUpJB7luhA/aWmTcnBj4=";
|
|
};
|
|
|
|
# ld: unknown option: -version-script
|
|
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
substituteInPlace CMakeLists.txt \
|
|
--replace-fail "if(CMAKE_C_COMPILER_ID MATCHES GNU|^Clang)" "if((CMAKE_C_COMPILER_ID MATCHES GNU|^Clang) AND NOT APPLE)"
|
|
'';
|
|
|
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
|
inherit (finalAttrs) src;
|
|
hash = "sha256-LTuUhQ0ZeyGloNvVs+6OGjFvPdBsQNZupwC8QTjUfyk=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
rustPlatform.cargoSetupHook
|
|
cargo
|
|
rustc
|
|
];
|
|
|
|
buildInputs = [
|
|
sqlite
|
|
corrosion
|
|
];
|
|
|
|
meta = {
|
|
description = "Intelligent Chinese phonetic input method";
|
|
homepage = "https://chewing.im/";
|
|
license = lib.licenses.lgpl21Only;
|
|
maintainers = with lib.maintainers; [ ShamrockLee ];
|
|
platforms = lib.platforms.all;
|
|
# compile time tools init_database, dump_database are built for host
|
|
broken = !stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
|
};
|
|
})
|