mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +00:00
ebae8b8309
and enable tests
63 lines
1.0 KiB
Nix
63 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitLab,
|
|
pkg-config,
|
|
libcangjie,
|
|
sqlite,
|
|
buildPythonPackage,
|
|
cython,
|
|
meson,
|
|
ninja,
|
|
cmake,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pycangjie";
|
|
version = "1.5.0";
|
|
|
|
format = "other";
|
|
|
|
src = fetchFromGitLab {
|
|
domain = "gitlab.freedesktop.org";
|
|
owner = "cangjie";
|
|
repo = "pycangjie";
|
|
rev = version;
|
|
hash = "sha256-REWX6u3Rc72+e5lIImBwV5uFoBBUTMM5BOfYdKIFL4k=";
|
|
};
|
|
|
|
preConfigure = ''
|
|
(
|
|
cd subprojects
|
|
set -x
|
|
cp -R --no-preserve=mode,ownership ${libcangjie.src} libcangjie
|
|
)
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
meson
|
|
ninja
|
|
cython
|
|
cmake
|
|
];
|
|
|
|
buildInputs = [
|
|
sqlite
|
|
];
|
|
|
|
pythonImportCheck = [ "cangjie" ];
|
|
|
|
# `buildPythonApplication` skips checkPhase
|
|
postInstallCheck = ''
|
|
mesonCheckPhase
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Python wrapper to libcangjie";
|
|
homepage = "http://cangjians.github.io/projects/pycangjie/";
|
|
license = licenses.lgpl3Plus;
|
|
maintainers = [ maintainers.linquize ];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|