nixpkgs/pkgs/development/python-modules/cmake/default.nix
Michael Daniels 075e8c2c4f
treewide: change 'format = "pyproject";' to 'pyproject = true;'
This is almost all find-and-replace.

I manually edited:
* pkgs/development/python-modules/notifications-android-tv/default.nix,
* pkgs/servers/home-assistant/default.nix,
* pkgs/development/tools/continuous-integration/buildbot/master.nix

A few files have not been changed in this PR because they would cause rebuilds.

This PR should have 0 rebuilds.
2026-01-12 17:50:35 -05:00

39 lines
938 B
Nix

{
lib,
buildPythonPackage,
flit-core,
cmake,
}:
buildPythonPackage {
pname = "cmake";
inherit (cmake) version;
pyproject = true;
src = ./stub;
postUnpack = ''
substituteInPlace "$sourceRoot/pyproject.toml" \
--subst-var version
substituteInPlace "$sourceRoot/cmake/__init__.py" \
--subst-var version \
--subst-var-by CMAKE_BIN_DIR "${cmake}/bin"
'';
inherit (cmake) setupHooks;
nativeBuildInputs = [ flit-core ];
pythonImportsCheck = [ "cmake" ];
meta = {
description = "CMake is an open-source, cross-platform family of tools designed to build, test and package software";
longDescription = ''
This is a stub of the cmake package on PyPI that uses the cmake program
provided by nixpkgs instead of downloading cmake from the web.
'';
homepage = "https://github.com/scikit-build/cmake-python-distributions";
license = lib.licenses.asl20;
};
}