1{ stdenv, fetchurl, bash, autoconf, automake, libtool, pkgconfig, libcangjie
2, sqlite, python3, cython3
3}:
4
5stdenv.mkDerivation rec {
6 name = "pycangjie-${version}";
7 version = "1.3_rev_${rev}";
8 rev = "361bb413203fd43bab624d98edf6f7d20ce6bfd3";
9
10 src = fetchurl {
11 name = "${name}.tar.gz";
12 url = "https://github.com/Cangjians/pycangjie/archive/${rev}.tar.gz";
13 sha256 = "12yi09nyffmn4va7lzk4irw349qzlbxgsnb89dh15cnw0xmrin05";
14 };
15
16 buildInputs = [
17 autoconf automake libtool pkgconfig libcangjie sqlite python3 cython3
18 ];
19
20 preConfigure = ''
21 find . -name '*.sh' -exec sed -e 's@#!/bin/bash@${bash}/bin/bash@' -i '{}' ';'
22 sed -i 's@/usr@${libcangjie}@' tests/__init__.py
23 '';
24
25 configureScript = "./autogen.sh";
26
27 doCheck = true;
28
29 meta = with stdenv.lib; {
30 description = "Python wrapper to libcangjie";
31 homepage = http://cangjians.github.io/projects/pycangjie/;
32 license = licenses.lgpl3Plus;
33 maintainers = [ maintainers.linquize ];
34 platforms = platforms.all;
35 };
36}