1{
2 lib,
3 fetchFromGitHub,
4 bash,
5 autoconf,
6 automake,
7 libtool,
8 pkg-config,
9 libcangjie,
10 sqlite,
11 buildPythonPackage,
12 cython,
13}:
14
15buildPythonPackage {
16 pname = "pycangjie";
17 version = "unstable-2015-05-03";
18 format = "other";
19
20 src = fetchFromGitHub {
21 owner = "Cangjians";
22 repo = "pycangjie";
23 rev = "361bb413203fd43bab624d98edf6f7d20ce6bfd3";
24 hash = "sha256-sS0Demzm89WtEIN4Efz0OTsUQ/c3gIX+/koekQGOca4=";
25 };
26
27 nativeBuildInputs = [
28 pkg-config
29 libtool
30 autoconf
31 automake
32 cython
33 ];
34 buildInputs = [
35 libcangjie
36 sqlite
37 ];
38
39 preConfigure = ''
40 find . -name '*.sh' -exec sed -e 's@#!/bin/bash@${bash}/bin/bash@' -i '{}' ';'
41 sed -i 's@/usr@${libcangjie}@' tests/__init__.py
42 '';
43
44 configureScript = "./autogen.sh";
45
46 doCheck = true;
47
48 meta = with lib; {
49 description = "Python wrapper to libcangjie";
50 homepage = "http://cangjians.github.io/projects/pycangjie/";
51 license = licenses.lgpl3Plus;
52 maintainers = [ maintainers.linquize ];
53 platforms = platforms.all;
54 };
55}