1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 meson,
6 ninja,
7 setuptools,
8 toml,
9 wheel,
10}:
11
12# TODO: offer meson as a Python package so we have dist-info folder.
13
14buildPythonPackage rec {
15 pname = "mesonpep517";
16 version = "0.2";
17 pyproject = true;
18
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-Fyo7JfLqHJqbahEjVDt/0xJxOfVLqLn3xNJ4lSB7KIw=";
22 };
23
24 # Applies the following merge request, which doesn't apply cleanly:
25 # https://gitlab.com/thiblahute/mesonpep517/-/merge_requests/25
26 #
27 postPatch = ''
28 substituteInPlace pyproject.toml \
29 --replace-fail 'backend-path = "."' 'backend-path = ["."]'
30 '';
31
32 build-system = [
33 setuptools
34 wheel
35 ];
36
37 dependencies = [ toml ];
38
39 propagatedNativeBuildInputs = [
40 meson
41 ninja
42 ];
43
44 meta = {
45 description = "Create pep517 compliant packages from the meson build system";
46 homepage = "https://gitlab.com/thiblahute/mesonpep517";
47 license = lib.licenses.asl20;
48 };
49}