2022-09-30 11:47:45 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, colorama
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pyproject-metadata
|
|
|
|
, tomli
|
2023-01-20 10:41:00 +00:00
|
|
|
, typing-extensions
|
|
|
|
, pythonOlder
|
2022-09-30 11:47:45 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "meson-python";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "0.12.1";
|
2022-09-30 11:47:45 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit version;
|
|
|
|
pname = "meson_python";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-PVs+WB1wpYqXucEWp16Xp2zEtMfnX6Blj8g5I3Hi8sI=";
|
2022-09-30 11:47:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pyproject-metadata
|
|
|
|
tomli
|
2023-01-20 10:41:00 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.10") [
|
|
|
|
typing-extensions
|
2022-09-30 11:47:45 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pyproject-metadata
|
|
|
|
tomli
|
2023-01-20 10:41:00 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.10") [
|
|
|
|
typing-extensions
|
2022-09-30 11:47:45 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# Ugly work-around. Drop ninja dependency.
|
|
|
|
# We already have ninja, but it comes without METADATA.
|
|
|
|
# Building ninja-python-distributions is the way to go.
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml --replace "'ninja'," ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2023-01-20 10:41:00 +00:00
|
|
|
changelog = "https://github.com/mesonbuild/meson-python/blob/${version}/CHANGELOG.rst";
|
2022-09-30 11:47:45 +00:00
|
|
|
description = "Meson Python build backend (PEP 517)";
|
2023-01-20 10:41:00 +00:00
|
|
|
homepage = "https://github.com/mesonbuild/meson-python";
|
2022-09-30 11:47:45 +00:00
|
|
|
license = [ lib.licenses.mit ];
|
|
|
|
maintainers = [ lib.maintainers.fridh ];
|
|
|
|
};
|
|
|
|
}
|