nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 cmake,
5 fetchFromGitHub,
6 future,
7 numpy,
8 pytest-lazy-fixture,
9 pytestCheckHook,
10 scikit-build,
11 setuptools,
12}:
13
14buildPythonPackage rec {
15 pname = "parselmouth";
16 version = "0.4.7";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "YannickJadoul";
21 repo = "Parselmouth";
22 tag = "v${version}";
23 fetchSubmodules = true;
24 hash = "sha256-gogNiKZVQaAzu/VeP4+bg61GtdptZeNkQatcJ/cjXFI=";
25 };
26
27 configurePhase = ''
28 # doesn't happen automatically
29 export MAKEFLAGS=-j$NIX_BUILD_CORES
30 '';
31
32 build-system = [
33 cmake
34 scikit-build
35 setuptools
36 ];
37
38 dontUseCmakeConfigure = true;
39
40 dependencies = [ numpy ];
41
42 nativeCheckInputs = [
43 future
44 pytest-lazy-fixture
45 pytestCheckHook
46 ];
47
48 pytestFlags = [
49 "--run-praat-tests"
50 "-v"
51 ];
52
53 pythonImportsCheck = [ "parselmouth" ];
54
55 meta = {
56 description = "Praat in Python, the Pythonic way";
57 homepage = "https://github.com/YannickJadoul/Parselmouth";
58 changelog = "https://github.com/YannickJadoul/Parselmouth/releases/tag/${src.tag}";
59 license = lib.licenses.gpl3Plus;
60 maintainers = with lib.maintainers; [ derdennisop ];
61 };
62}