Files
nixpkgs/pkgs/development/python-modules/cmake/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

40 lines
942 B
Nix

{
lib,
buildPythonPackage,
flit-core,
cmake,
}:
buildPythonPackage {
pname = "cmake";
inherit (cmake) version;
format = "pyproject";
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;
};
}