tt-logger: init 1.1.9

This commit is contained in:
Tristan Ross
2026-06-05 12:59:05 -07:00
parent 848616a0d2
commit 2aa8307146
2 changed files with 80 additions and 0 deletions
@@ -0,0 +1,16 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b3c7ca3..927e11c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,8 +41,9 @@ if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.23)
INTERFACE
FILE_SET api
TYPE HEADERS
- BASE_DIRS ${CMAKE_INSTALL_INCLUDEDIR}
- FILES ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/tt-logger.hpp
+ BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include
+ FILES
+ include/${PROJECT_NAME}/tt-logger.hpp
)
endif()
+64
View File
@@ -0,0 +1,64 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchurl,
cmake,
ninja,
pkg-config,
fmt_11,
spdlog,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "tt-logger";
version = "1.1.9";
__structuredAttrs = true;
strictDeps = true;
src = fetchFromGitHub {
owner = "tenstorrent";
repo = "tt-logger";
tag = "v${finalAttrs.version}";
hash = "sha256-Vd/FwjcNZWh/FnP5CwXO4UQtKTq/6GhRSppCYJMj9d4=";
};
cpm = fetchurl {
url = "https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.40.2/CPM.cmake";
hash = "sha256-yM3DLAOBZTjOInge1ylk3IZLKjSjENO3EEgSpcotg10=";
};
patches = [
# https://github.com/tenstorrent/tt-logger/pull/27
./fix-install.patch
];
postPatch = ''
cp $cpm cmake/CPM.cmake
'';
nativeBuildInputs = [
cmake
ninja
pkg-config
];
buildInputs = [
fmt_11
spdlog
];
cmakeFlags = [
(lib.cmakeBool "FETCHCONTENT_FULLY_DISCONNECTED" true)
(lib.cmakeBool "CPM_USE_LOCAL_PACKAGES_ONLY" true)
(lib.cmakeBool "CPM_LOCAL_PACKAGES_ONLY" true)
(lib.cmakeBool "TT_LOGGER_INSTALL" true)
];
meta = {
description = "Flexible and performant C++ logging library for Tenstorrent projects";
homepage = "https://github.com/tenstorrent/tt-logger";
maintainers = with lib.maintainers; [ RossComputerGuy ];
license = with lib.licenses; [ asl20 ];
platforms = lib.platforms.linux;
};
})