2016-11-08 18:29:43 +00:00
|
|
|
{ stdenv, fetchurl, cmake, python }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2017-02-09 14:35:17 +00:00
|
|
|
name = "opencc-1.0.5";
|
2016-11-08 18:29:43 +00:00
|
|
|
src = fetchurl {
|
2017-02-09 14:35:17 +00:00
|
|
|
url = "https://github.com/BYVoid/OpenCC/archive/ver.1.0.5.tar.gz";
|
|
|
|
sha256 = "1ce1649ba280cfc88bb76e740be5f54b29a9c034400c97a3ae211c37d7030705";
|
2016-11-08 18:29:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ cmake python ];
|
|
|
|
|
2020-02-03 15:44:25 +00:00
|
|
|
preBuild = ''
|
2017-09-12 14:47:33 +00:00
|
|
|
# let intermediate tools find intermediate library
|
2020-02-03 15:44:25 +00:00
|
|
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$(pwd)/src
|
|
|
|
'';
|
2016-11-08 18:29:43 +00:00
|
|
|
|
2017-09-12 14:47:33 +00:00
|
|
|
# Parallel building occasionaly fails with: Error copying file "/tmp/nix-build-opencc-1.0.5.drv-0/OpenCC-ver.1.0.5/build/src/libopencc.so.1.0.0" to "/tmp/nix-build-opencc-1.0.5.drv-0/OpenCC-ver.1.0.5/build/src/tools".
|
|
|
|
enableParallelBuilding = false;
|
|
|
|
|
2016-11-08 18:29:43 +00:00
|
|
|
meta = with stdenv.lib; {
|
2017-08-01 20:03:30 +00:00
|
|
|
homepage = https://github.com/BYVoid/OpenCC;
|
2016-11-08 18:29:43 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
description = "A project for conversion between Traditional and Simplified Chinese";
|
|
|
|
longDescription = ''
|
|
|
|
Open Chinese Convert (OpenCC) is an opensource project for conversion between
|
|
|
|
Traditional Chinese and Simplified Chinese, supporting character-level conversion,
|
|
|
|
phrase-level conversion, variant conversion and regional idioms among Mainland China,
|
|
|
|
Taiwan and Hong kong.
|
|
|
|
'';
|
2017-10-03 12:07:12 +00:00
|
|
|
maintainers = [ maintainers.sifmelcara ];
|
2016-11-08 18:29:43 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|