From 206b276fedfdd4363215003b16352342a4a04bb7 Mon Sep 17 00:00:00 2001 From: Linquize Date: Sun, 2 Feb 2014 21:34:40 +0800 Subject: [PATCH] Add pycangjie MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [Bjørn Forsman : expression cleanup] --- .../python-modules/pycangjie/default.nix | 35 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/python-modules/pycangjie/default.nix diff --git a/pkgs/development/python-modules/pycangjie/default.nix b/pkgs/development/python-modules/pycangjie/default.nix new file mode 100644 index 00000000000..04f7e434a54 --- /dev/null +++ b/pkgs/development/python-modules/pycangjie/default.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchurl, bash, autoconf, automake, libtool, pkgconfig, libcangjie +, sqlite, python3, cython3 +}: + +stdenv.mkDerivation rec { + name = "pycangjie-${version}"; + version = "1.0"; + + src = fetchurl { + name = "${name}.tar.gz"; + url = "https://github.com/Cangjians/pycangjie/archive/v${version}.tar.gz"; + sha256 = "1wx0m0chcpgxhj6cdxrwyi8hq05xlbap1ifs0wzb6nkglir0sb4j"; + }; + + buildInputs = [ + autoconf automake libtool pkgconfig libcangjie sqlite python3 cython3 + ]; + + 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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d49dc207133..5b5572c119f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1702,6 +1702,8 @@ let pwnat = callPackage ../tools/networking/pwnat { }; + pycangjie = callPackage ../development/python-modules/pycangjie { }; + pydb = callPackage ../development/tools/pydb { }; pystringtemplate = callPackage ../development/python-modules/stringtemplate { };