83405b6dd2
GitOrigin-RevId: ac718d02867a84b42522a0ece52d841188208f2c
57 lines
1.2 KiB
Nix
57 lines
1.2 KiB
Nix
{ lib
|
|
, stdenv
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, colorama
|
|
, meson
|
|
, ninja
|
|
, pyproject-metadata
|
|
, tomli
|
|
, typing-extensions
|
|
, pythonOlder
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "meson-python";
|
|
version = "0.12.1";
|
|
format = "pyproject";
|
|
|
|
src = fetchPypi {
|
|
inherit version;
|
|
pname = "meson_python";
|
|
hash = "sha256-PVs+WB1wpYqXucEWp16Xp2zEtMfnX6Blj8g5I3Hi8sI=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
meson
|
|
ninja
|
|
pyproject-metadata
|
|
tomli
|
|
] ++ lib.optionals (pythonOlder "3.10") [
|
|
typing-extensions
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
meson
|
|
ninja
|
|
pyproject-metadata
|
|
tomli
|
|
] ++ lib.optionals (pythonOlder "3.10") [
|
|
typing-extensions
|
|
];
|
|
|
|
# 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 = {
|
|
changelog = "https://github.com/mesonbuild/meson-python/blob/${version}/CHANGELOG.rst";
|
|
description = "Meson Python build backend (PEP 517)";
|
|
homepage = "https://github.com/mesonbuild/meson-python";
|
|
license = [ lib.licenses.mit ];
|
|
maintainers = [ lib.maintainers.fridh ];
|
|
};
|
|
}
|