cpm-cmake: Set CURRENT_CPM_VERSION; adopt; format (#354654)

This commit is contained in:
Rick van Schijndel 2024-11-12 08:47:12 +01:00 committed by GitHub
commit efa952e65b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,7 @@
{ lib
, stdenvNoCC
, fetchFromGitHub
{
lib,
stdenvNoCC,
fetchFromGitHub,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
@ -14,6 +15,11 @@ stdenvNoCC.mkDerivation (finalAttrs: {
hash = "sha256-KIRVztkE72juIgXquZlC6AYo78QKHBD7iCvCa+ri66k=";
};
postPatch = ''
substituteInPlace cmake/CPM.cmake \
--replace-fail "set(CURRENT_CPM_VERSION 1.0.0-development-version)" "set(CURRENT_CPM_VERSION ${finalAttrs.version})"
'';
dontConfigure = true;
dontBuild = true;
@ -27,7 +33,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
runHook postInstall
'';
meta = with lib; {
meta = {
homepage = "https://github.com/cpm-cmake/CPM.cmake";
description = "CMake's missing package manager";
longDescription = ''
@ -36,8 +42,8 @@ stdenvNoCC.mkDerivation (finalAttrs: {
CMake's FetchContent module that adds version control, caching, a
simple API and more.
'';
license = licenses.mit;
maintainers = [ ];
platforms = platforms.all;
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ pandapip1 ];
platforms = lib.platforms.all;
};
})