mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 15:56:50 +01:00
commit
ac2699fdca
1 changed files with 18 additions and 12 deletions
|
@ -1,24 +1,30 @@
|
||||||
{ stdenv, fetchurl, cmake, python }:
|
{ stdenv, fetchFromGitHub, cmake, python }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation rec {
|
||||||
name = "opencc-1.0.5";
|
pname = "opencc";
|
||||||
src = fetchurl {
|
version = "1.0.5";
|
||||||
url = "https://github.com/BYVoid/OpenCC/archive/ver.1.0.5.tar.gz";
|
|
||||||
sha256 = "1ce1649ba280cfc88bb76e740be5f54b29a9c034400c97a3ae211c37d7030705";
|
src = fetchFromGitHub {
|
||||||
|
owner = "BYVoid";
|
||||||
|
repo = "OpenCC";
|
||||||
|
rev = "ver.${version}";
|
||||||
|
sha256 = "1pv5md225qwhbn8ql932zdg6gh1qlx3paiajaks8gfsa07yzvhr4";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ cmake python ];
|
nativeBuildInputs = [ cmake python ];
|
||||||
|
|
||||||
preBuild = ''
|
# let intermediate tools find intermediate library
|
||||||
# let intermediate tools find intermediate library
|
preBuild = stdenv.lib.optionalString stdenv.isLinux ''
|
||||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$(pwd)/src
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$(pwd)/src
|
||||||
|
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
|
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}$(pwd)/src
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# 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".
|
# 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;
|
enableParallelBuilding = false;
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = https://github.com/BYVoid/OpenCC;
|
homepage = "https://github.com/BYVoid/OpenCC";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
description = "A project for conversion between Traditional and Simplified Chinese";
|
description = "A project for conversion between Traditional and Simplified Chinese";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
|
@ -27,7 +33,7 @@ stdenv.mkDerivation {
|
||||||
phrase-level conversion, variant conversion and regional idioms among Mainland China,
|
phrase-level conversion, variant conversion and regional idioms among Mainland China,
|
||||||
Taiwan and Hong kong.
|
Taiwan and Hong kong.
|
||||||
'';
|
'';
|
||||||
maintainers = [ maintainers.sifmelcara ];
|
maintainers = with maintainers; [ sifmelcara ];
|
||||||
platforms = platforms.linux;
|
platforms = with platforms; linux ++ darwin;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue