2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, meson
|
|
|
|
, ninja
|
2022-09-30 11:47:45 +00:00
|
|
|
, setuptools
|
2021-07-17 21:14:59 +00:00
|
|
|
, toml
|
2023-08-04 22:07:22 +00:00
|
|
|
, wheel
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
# TODO: offer meson as a Python package so we have dist-info folder.
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mesonpep517";
|
2021-07-17 21:14:59 +00:00
|
|
|
version = "0.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-Fyo7JfLqHJqbahEjVDt/0xJxOfVLqLn3xNJ4lSB7KIw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
# Applies the following merge request, which doesn't apply cleanly:
|
|
|
|
# https://gitlab.com/thiblahute/mesonpep517/-/merge_requests/25
|
|
|
|
#
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'backend-path = "."' 'backend-path = ["."]'
|
|
|
|
'';
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
2023-08-04 22:07:22 +00:00
|
|
|
wheel
|
2022-09-30 11:47:45 +00:00
|
|
|
];
|
|
|
|
|
2021-07-17 21:14:59 +00:00
|
|
|
propagatedBuildInputs = [ toml ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedNativeBuildInputs = [ meson ninja ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Create pep517 compliant packages from the meson build system";
|
|
|
|
homepage = "https://gitlab.com/thiblahute/mesonpep517";
|
|
|
|
license = lib.licenses.asl20;
|
|
|
|
maintainers = [ lib.maintainers.fridh ];
|
|
|
|
};
|
|
|
|
}
|