1{ lib
2, buildPythonPackage
3, fetchPypi
4, meson
5, ninja
6, intreehooks
7, pytoml
8, pythonOlder
9}:
10
11# TODO: offer meson as a Python package so we have dist-info folder.
12
13buildPythonPackage rec {
14 pname = "mesonpep517";
15 version = "0.1.9999994";
16 format = "pyproject";
17
18 src = fetchPypi {
19 inherit pname version;
20 sha256 = "b5bcca61024164c4a51d29e6921ea1f756d54197c8f052e4c66a2b8399aa9349";
21 };
22
23 nativeBuildInputs = [ intreehooks ];
24
25 propagatedBuildInputs = [ pytoml ];
26
27 # postPatch = ''
28 # # Meson tries to detect ninja as well, so we should patch meson as well.
29 # substituteInPlace mesonpep517/buildapi.py \
30 # --replace "'meson'" "'${meson}/bin/meson'" \
31 # --replace "'ninja'" "'${ninja}/bin/ninja'"
32 # '';
33
34 propagatedNativeBuildInputs = [ meson ninja ];
35
36 meta = {
37 description = "Create pep517 compliant packages from the meson build system";
38 homepage = "https://gitlab.com/thiblahute/mesonpep517";
39 license = lib.licenses.asl20;
40 maintainers = [ lib.maintainers.fridh ];
41 };
42}