2024-11-09 08:56:58 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenvNoCC,
|
|
|
|
fetchFromGitHub,
|
2022-07-15 02:14:41 +00:00
|
|
|
}:
|
|
|
|
|
2022-12-12 18:44:59 +00:00
|
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
|
|
|
pname = "cpm-cmake";
|
2024-08-09 23:22:14 +00:00
|
|
|
version = "0.40.2";
|
2022-07-15 02:14:41 +00:00
|
|
|
|
2022-12-12 18:44:59 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cpm-cmake";
|
|
|
|
repo = "cpm.cmake";
|
|
|
|
rev = "v${finalAttrs.version}";
|
2024-08-09 23:22:14 +00:00
|
|
|
hash = "sha256-KIRVztkE72juIgXquZlC6AYo78QKHBD7iCvCa+ri66k=";
|
2022-07-15 02:14:41 +00:00
|
|
|
};
|
|
|
|
|
2024-11-09 01:09:45 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace cmake/CPM.cmake \
|
|
|
|
--replace-fail "set(CURRENT_CPM_VERSION 1.0.0-development-version)" "set(CURRENT_CPM_VERSION ${finalAttrs.version})"
|
|
|
|
'';
|
|
|
|
|
2022-07-15 02:14:41 +00:00
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
2022-07-16 08:29:43 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2022-12-12 18:44:59 +00:00
|
|
|
mkdir -p $out/share/{,doc/}cpm
|
|
|
|
install -Dm644 cmake/CPM.cmake $out/share/cpm/CPM.cmake
|
|
|
|
install -Dm644 README.md CONTRIBUTING.md $out/share/doc/cpm/
|
2022-07-16 08:29:43 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2022-07-15 02:14:41 +00:00
|
|
|
'';
|
|
|
|
|
2024-11-09 08:57:57 +00:00
|
|
|
meta = {
|
2022-07-15 02:14:41 +00:00
|
|
|
homepage = "https://github.com/cpm-cmake/CPM.cmake";
|
|
|
|
description = "CMake's missing package manager";
|
|
|
|
longDescription = ''
|
|
|
|
CPM.cmake is a cross-platform CMake script that adds dependency
|
|
|
|
management capabilities to CMake. It's built as a thin wrapper around
|
|
|
|
CMake's FetchContent module that adds version control, caching, a
|
|
|
|
simple API and more.
|
|
|
|
'';
|
2024-11-09 08:57:57 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ pandapip1 ];
|
|
|
|
platforms = lib.platforms.all;
|
2022-07-15 02:14:41 +00:00
|
|
|
};
|
2022-12-12 18:44:59 +00:00
|
|
|
})
|