diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/cmake/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/cmake/default.nix | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/cmake/default.nix b/nixpkgs/pkgs/development/python-modules/cmake/default.nix new file mode 100644 index 000000000000..c9ee7d11c8fb --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/cmake/default.nix @@ -0,0 +1,43 @@ +{ lib +, buildPythonPackage +, flit-core +, cmake +}: + +buildPythonPackage rec { + 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 = with lib; { + 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 = licenses.asl20; + maintainers = with maintainers; [ tjni ]; + }; +} |