about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pycangjie/default.nix
blob: caca2f9f3d0a6daeeac72c1c6982f1fa8a0f3c0b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{
  lib,
  fetchFromGitHub,
  bash,
  autoconf,
  automake,
  libtool,
  pkg-config,
  libcangjie,
  sqlite,
  buildPythonPackage,
  cython,
}:

buildPythonPackage {
  pname = "pycangjie";
  version = "unstable-2015-05-03";
  format = "other";

  src = fetchFromGitHub {
    owner = "Cangjians";
    repo = "pycangjie";
    rev = "361bb413203fd43bab624d98edf6f7d20ce6bfd3";
    hash = "sha256-sS0Demzm89WtEIN4Efz0OTsUQ/c3gIX+/koekQGOca4=";
  };

  nativeBuildInputs = [
    pkg-config
    libtool
    autoconf
    automake
    cython
  ];
  buildInputs = [
    libcangjie
    sqlite
  ];

  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 lib; {
    description = "Python wrapper to libcangjie";
    homepage = "http://cangjians.github.io/projects/pycangjie/";
    license = licenses.lgpl3Plus;
    maintainers = [ maintainers.linquize ];
    platforms = platforms.all;
  };
}