depot/third_party/nixpkgs/pkgs/development/python-modules/meson-python/default.nix

51 lines
975 B
Nix
Raw Normal View History

{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, colorama
, meson
, ninja
, pyproject-metadata
, tomli
}:
buildPythonPackage rec {
pname = "meson-python";
version = "0.8.1";
format = "pyproject";
src = fetchPypi {
inherit version;
pname = "meson_python";
hash = "sha256-RC8fpM9dtQ7qYRcKYFnBD6/XCXf12980QcEGzSOwXkw=";
};
nativeBuildInputs = [
meson
ninja
pyproject-metadata
tomli
];
propagatedBuildInputs = [
meson
ninja
pyproject-metadata
tomli
];
# 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 = {
description = "Meson Python build backend (PEP 517)";
homepage = "https://github.com/FFY00/meson-python";
license = [ lib.licenses.mit ];
maintainers = [ lib.maintainers.fridh ];
};
}