nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, fetchurl, cmake, python }:
2
3stdenv.mkDerivation {
4 name = "opencc-1.0.5";
5 src = fetchurl {
6 url = "https://github.com/BYVoid/OpenCC/archive/ver.1.0.5.tar.gz";
7 sha256 = "1ce1649ba280cfc88bb76e740be5f54b29a9c034400c97a3ae211c37d7030705";
8 };
9
10 buildInputs = [ cmake python ];
11
12 makeFlags = [
13 # let intermediate tools find intermediate library
14 "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(CURDIR)/src"
15 ];
16
17 # 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".
18 enableParallelBuilding = false;
19
20 meta = with stdenv.lib; {
21 homepage = https://github.com/BYVoid/OpenCC;
22 license = licenses.asl20;
23 description = "A project for conversion between Traditional and Simplified Chinese";
24 longDescription = ''
25 Open Chinese Convert (OpenCC) is an opensource project for conversion between
26 Traditional Chinese and Simplified Chinese, supporting character-level conversion,
27 phrase-level conversion, variant conversion and regional idioms among Mainland China,
28 Taiwan and Hong kong.
29 '';
30 maintainers = [ maintainers.sifmelcara ];
31 platforms = platforms.linux;
32 };
33}