termbench-pro: 2023-01-26 -> 2024-10-05

This commit is contained in:
moni 2024-11-03 08:25:18 +08:00
parent 37279cb3d6
commit ac196039ed
3 changed files with 65 additions and 9 deletions

View File

@ -0,0 +1,41 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6948010..1ee264f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,14 +14,15 @@ if(NOT WIN32 AND NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS Debug Release MinSizeRel RelWithDebInfo)
endif()
-include(FetchContent)
-FetchContent_Declare(
- glaze
- GIT_REPOSITORY https://github.com/stephenberry/glaze.git
- GIT_TAG v3.4.2
- GIT_SHALLOW TRUE
-)
-FetchContent_MakeAvailable(glaze)
+#include(FetchContent)
+#FetchContent_Declare(
+ #glaze
+ #GIT_REPOSITORY https://github.com/stephenberry/glaze.git
+ #GIT_TAG v3.4.2
+ # GIT_SHALLOW TRUE
+ #)
+#FetchContent_MakeAvailable(glaze)
+#add()
set(MASTER_PROJECT OFF)
if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR})
diff --git a/libtermbench/CMakeLists.txt b/libtermbench/CMakeLists.txt
index f0ddc75..93f63ed 100644
--- a/libtermbench/CMakeLists.txt
+++ b/libtermbench/CMakeLists.txt
@@ -25,6 +25,8 @@ set_target_properties(termbench PROPERTIES
target_include_directories(termbench PUBLIC $<BUILD_INTERFACE:${${PROJECT_NAME}_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
+
+find_package(glaze REQUIRED)
target_link_libraries(termbench PUBLIC glaze::glaze)
install(TARGETS termbench

View File

@ -1,33 +1,46 @@
{ lib, stdenv, fetchFromGitHub, cmake, fmt }:
{
lib,
stdenv,
fetchFromGitHub,
cmake,
fmt,
glaze,
}:
stdenv.mkDerivation {
pname = "termbench-pro";
version = "unstable-2023-01-26";
version = "unstable-2024-10-05";
src = fetchFromGitHub {
owner = "contour-terminal";
repo = "termbench-pro";
rev = "a4feadd3a698e4fe2d9dd5b03d5f941534a25a91";
hash = "sha256-/zpJY9Mecalk7dneYZYzmFOroopFGklWw62a+LbiUVs=";
rev = "22a0c42f78dc2e522eb1089bf9976a9ff0ecdcad";
hash = "sha256-Yyvlu/yx/yGc9Ci9Pn098YfTdywLZEaowQZeLM4WGjQ";
};
# don't fetch glaze from CMakeLists.txt
patches = [ ./dont-fetchcontent.diff ];
nativeBuildInputs = [ cmake ];
buildInputs = [ fmt ];
buildInputs = [
fmt
glaze
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
mkdir -p $out/lib
mv termbenchpro/tbp $out/bin
mv libtermbench/libtermbench.a $out/lib
mv tb/tb $out/bin
mv libtermbench/libtermbench.* $out/lib
runHook postInstall
'';
meta = with lib; {
description = "Terminal Benchmarking as CLI and library";
mainProgram = "tbp";
mainProgram = "tb";
license = licenses.asl20;
platforms = platforms.unix;
maintainers = with maintainers; [ moni ];

View File

@ -11216,7 +11216,9 @@ with pkgs;
harfbuzz = harfbuzzFull;
};
termbench-pro = callPackage ../development/libraries/termbench-pro { fmt = fmt_8; };
termbench-pro = callPackage ../by-name/te/termbench-pro/package.nix {
stdenv = if stdenv.hostPlatform.isDarwin then llvmPackages_17.stdenv else stdenv;
};
texpresso = callPackage ../tools/typesetting/tex/texpresso {
texpresso-tectonic = callPackage ../tools/typesetting/tex/texpresso/tectonic.nix { };