nixpkgs/pkgs/development/python-modules/pycangjie/default.nix
Peder Bergebakken Sundt ebae8b8309 python312Packages.pycangjie: unstable-2015-05-03 -> 1.5.0
and enable tests
2024-11-14 03:44:11 +01:00

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;
};
}