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