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

+92 -36
+41
pkgs/by-name/te/termbench-pro/dont-fetchcontent.diff
··· 1 + diff --git a/CMakeLists.txt b/CMakeLists.txt 2 + index 6948010..1ee264f 100644 3 + --- a/CMakeLists.txt 4 + +++ b/CMakeLists.txt 5 + @@ -14,14 +14,15 @@ if(NOT WIN32 AND NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 6 + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS Debug Release MinSizeRel RelWithDebInfo) 7 + endif() 8 + 9 + -include(FetchContent) 10 + -FetchContent_Declare( 11 + - glaze 12 + - GIT_REPOSITORY https://github.com/stephenberry/glaze.git 13 + - GIT_TAG v3.4.2 14 + - GIT_SHALLOW TRUE 15 + -) 16 + -FetchContent_MakeAvailable(glaze) 17 + +#include(FetchContent) 18 + +#FetchContent_Declare( 19 + + #glaze 20 + + #GIT_REPOSITORY https://github.com/stephenberry/glaze.git 21 + + #GIT_TAG v3.4.2 22 + + # GIT_SHALLOW TRUE 23 + + #) 24 + +#FetchContent_MakeAvailable(glaze) 25 + +#add() 26 + 27 + set(MASTER_PROJECT OFF) 28 + if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR}) 29 + diff --git a/libtermbench/CMakeLists.txt b/libtermbench/CMakeLists.txt 30 + index f0ddc75..93f63ed 100644 31 + --- a/libtermbench/CMakeLists.txt 32 + +++ b/libtermbench/CMakeLists.txt 33 + @@ -25,6 +25,8 @@ set_target_properties(termbench PROPERTIES 34 + 35 + target_include_directories(termbench PUBLIC $<BUILD_INTERFACE:${${PROJECT_NAME}_SOURCE_DIR}> 36 + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) 37 + + 38 + +find_package(glaze REQUIRED) 39 + target_link_libraries(termbench PUBLIC glaze::glaze) 40 + 41 + install(TARGETS termbench
+48
pkgs/by-name/te/termbench-pro/package.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchFromGitHub, 5 + cmake, 6 + fmt, 7 + glaze, 8 + }: 9 + 10 + stdenv.mkDerivation { 11 + pname = "termbench-pro"; 12 + version = "unstable-2024-10-05"; 13 + 14 + src = fetchFromGitHub { 15 + owner = "contour-terminal"; 16 + repo = "termbench-pro"; 17 + rev = "22a0c42f78dc2e522eb1089bf9976a9ff0ecdcad"; 18 + hash = "sha256-Yyvlu/yx/yGc9Ci9Pn098YfTdywLZEaowQZeLM4WGjQ"; 19 + }; 20 + 21 + # don't fetch glaze from CMakeLists.txt 22 + patches = [ ./dont-fetchcontent.diff ]; 23 + 24 + nativeBuildInputs = [ cmake ]; 25 + buildInputs = [ 26 + fmt 27 + glaze 28 + ]; 29 + 30 + installPhase = '' 31 + runHook preInstall 32 + 33 + mkdir -p $out/bin 34 + mkdir -p $out/lib 35 + mv tb/tb $out/bin 36 + mv libtermbench/libtermbench.* $out/lib 37 + 38 + runHook postInstall 39 + ''; 40 + 41 + meta = with lib; { 42 + description = "Terminal Benchmarking as CLI and library"; 43 + mainProgram = "tb"; 44 + license = licenses.asl20; 45 + platforms = platforms.unix; 46 + maintainers = with maintainers; [ moni ]; 47 + }; 48 + }
-35
pkgs/development/libraries/termbench-pro/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, cmake, fmt }: 2 - 3 - stdenv.mkDerivation { 4 - pname = "termbench-pro"; 5 - version = "unstable-2023-01-26"; 6 - 7 - src = fetchFromGitHub { 8 - owner = "contour-terminal"; 9 - repo = "termbench-pro"; 10 - rev = "a4feadd3a698e4fe2d9dd5b03d5f941534a25a91"; 11 - hash = "sha256-/zpJY9Mecalk7dneYZYzmFOroopFGklWw62a+LbiUVs="; 12 - }; 13 - 14 - nativeBuildInputs = [ cmake ]; 15 - buildInputs = [ fmt ]; 16 - 17 - installPhase = '' 18 - runHook preInstall 19 - 20 - mkdir -p $out/bin 21 - mkdir -p $out/lib 22 - mv termbenchpro/tbp $out/bin 23 - mv libtermbench/libtermbench.a $out/lib 24 - 25 - runHook postInstall 26 - ''; 27 - 28 - meta = with lib; { 29 - description = "Terminal Benchmarking as CLI and library"; 30 - mainProgram = "tbp"; 31 - license = licenses.asl20; 32 - platforms = platforms.unix; 33 - maintainers = with maintainers; [ moni ]; 34 - }; 35 - }
+3 -1
pkgs/top-level/all-packages.nix
··· 11216 11216 harfbuzz = harfbuzzFull; 11217 11217 }; 11218 11218 11219 - termbench-pro = callPackage ../development/libraries/termbench-pro { fmt = fmt_8; }; 11219 + termbench-pro = callPackage ../by-name/te/termbench-pro/package.nix { 11220 + stdenv = if stdenv.hostPlatform.isDarwin then llvmPackages_17.stdenv else stdenv; 11221 + }; 11220 11222 11221 11223 texpresso = callPackage ../tools/typesetting/tex/texpresso { 11222 11224 texpresso-tectonic = callPackage ../tools/typesetting/tex/texpresso/tectonic.nix { };