2014-02-02 13:34:40 +00:00
|
|
|
{ stdenv, fetchurl, bash, autoconf, automake, libtool, pkgconfig, libcangjie
|
2015-12-09 10:58:38 +00:00
|
|
|
, sqlite, python, cython
|
2014-02-02 13:34:40 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-12-09 13:19:13 +00:00
|
|
|
name = "${python.libPrefix}-pycangjie-${version}";
|
2015-09-05 12:53:41 +00:00
|
|
|
version = "1.3_rev_${rev}";
|
|
|
|
rev = "361bb413203fd43bab624d98edf6f7d20ce6bfd3";
|
2014-02-02 13:34:40 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
name = "${name}.tar.gz";
|
2015-09-05 12:53:41 +00:00
|
|
|
url = "https://github.com/Cangjians/pycangjie/archive/${rev}.tar.gz";
|
|
|
|
sha256 = "12yi09nyffmn4va7lzk4irw349qzlbxgsnb89dh15cnw0xmrin05";
|
2014-02-02 13:34:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
2015-12-09 10:58:38 +00:00
|
|
|
autoconf automake libtool pkgconfig libcangjie sqlite python cython
|
2014-02-02 13:34:40 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
find . -name '*.sh' -exec sed -e 's@#!/bin/bash@${bash}/bin/bash@' -i '{}' ';'
|
|
|
|
sed -i 's@/usr@${libcangjie}@' tests/__init__.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureScript = "./autogen.sh";
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Python wrapper to libcangjie";
|
|
|
|
homepage = http://cangjians.github.io/projects/pycangjie/;
|
|
|
|
license = licenses.lgpl3Plus;
|
|
|
|
maintainers = [ maintainers.linquize ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|