contour: 0.4.3.6442 -> 0.5.1.7247 (#353255)

This commit is contained in:
Weijia Wang 2024-11-23 11:41:46 +01:00 committed by GitHub
commit 0d992c680b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 257 additions and 152 deletions

View File

@ -1,106 +0,0 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, pkg-config
, boxed-cpp
, freetype
, fontconfig
, libunicode
, libutempter
, termbench-pro
, qtmultimedia
, qt5compat
, wrapQtAppsHook
, pcre
, boost
, catch2
, fmt
, microsoft-gsl
, range-v3
, yaml-cpp
, ncurses
, file
, utmp
, sigtool
, nixosTests
, installShellFiles
}:
stdenv.mkDerivation (final: {
pname = "contour";
version = "0.4.3.6442";
src = fetchFromGitHub {
owner = "contour-terminal";
repo = "contour";
rev = "v${final.version}";
hash = "sha256-m3BEhGbyQm07+1/h2IRhooLPDewmSuhRHOMpWPDluiY=";
};
patches = [ ./dont-fix-app-bundle.diff ];
outputs = [ "out" "terminfo" ];
nativeBuildInputs = [
cmake
pkg-config
ncurses
file
wrapQtAppsHook
installShellFiles
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ sigtool ];
buildInputs = [
boxed-cpp
fontconfig
freetype
libunicode
termbench-pro
qtmultimedia
qt5compat
pcre
boost
catch2
fmt
microsoft-gsl
range-v3
yaml-cpp
]
++ lib.optionals stdenv.hostPlatform.isLinux [ libutempter ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ utmp ];
cmakeFlags = [ "-DCONTOUR_QT_VERSION=6" ];
postInstall = ''
mkdir -p $out/nix-support $terminfo/share
'' + lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir $out/Applications
installShellCompletion --zsh $out/contour.app/Contents/Resources/shell-integration/shell-integration.zsh
installShellCompletion --fish $out/contour.app/Contents/Resources/shell-integration/shell-integration.fish
cp -r $out/contour.app/Contents/Resources/terminfo $terminfo/share
mv $out/contour.app $out/Applications
ln -s $out/bin $out/Applications/contour.app/Contents/MacOS
'' + lib.optionalString stdenv.hostPlatform.isLinux ''
mv $out/share/terminfo $terminfo/share/
installShellCompletion --zsh $out/share/contour/shell-integration/shell-integration.zsh
installShellCompletion --fish $out/share/contour/shell-integration/shell-integration.fish
'' + ''
echo "$terminfo" >> $out/nix-support/propagated-user-env-packages
'';
passthru.tests.test = nixosTests.terminal-emulators.contour;
meta = with lib; {
description = "Modern C++ Terminal Emulator";
homepage = "https://github.com/contour-terminal/contour";
changelog = "https://github.com/contour-terminal/contour/raw/v${version}/Changelog.md";
license = licenses.asl20;
maintainers = with maintainers; [ moni ];
platforms = platforms.unix;
mainProgram = "contour";
# This was caused by boxed-cpp 1.4.2 -> 1.4.3
# More details in issue #345752
broken = true;
};
})

View File

@ -0,0 +1,114 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
boxed-cpp,
freetype,
fontconfig,
libunicode,
libutempter,
termbench-pro,
qt6,
pcre,
boost,
catch2_3,
fmt,
microsoft-gsl,
range-v3,
yaml-cpp,
ncurses,
file,
apple-sdk_11,
libutil,
sigtool,
nixosTests,
installShellFiles,
}:
stdenv.mkDerivation (final: {
pname = "contour";
version = "0.5.1.7247";
src = fetchFromGitHub {
owner = "contour-terminal";
repo = "contour";
rev = "v${final.version}";
hash = "sha256-/vpbyaULemyM3elwaoofvbeeID7jNrmu8X8HlZxWGCk";
};
patches = [ ./dont-fix-app-bundle.diff ];
outputs = [
"out"
"terminfo"
];
nativeBuildInputs = [
cmake
pkg-config
ncurses
file
qt6.wrapQtAppsHook
installShellFiles
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ sigtool ];
buildInputs =
[
boxed-cpp
fontconfig
freetype
libunicode
termbench-pro
qt6.qtmultimedia
qt6.qt5compat
pcre
boost
catch2_3
fmt
microsoft-gsl
range-v3
yaml-cpp
]
++ lib.optionals stdenv.hostPlatform.isLinux [ libutempter ]
++ lib.optionals stdenv.hostPlatform.isDarwin [
apple-sdk_11
libutil
];
cmakeFlags = [ "-DCONTOUR_QT_VERSION=6" ];
postInstall =
''
mkdir -p $out/nix-support $terminfo/share
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir $out/Applications
installShellCompletion --zsh $out/contour.app/Contents/Resources/shell-integration/shell-integration.zsh
installShellCompletion --fish $out/contour.app/Contents/Resources/shell-integration/shell-integration.fish
cp -r $out/contour.app/Contents/Resources/terminfo $terminfo/share
mv $out/contour.app $out/Applications
ln -s $out/bin $out/Applications/contour.app/Contents/MacOS
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
mv $out/share/terminfo $terminfo/share/
installShellCompletion --zsh $out/share/contour/shell-integration/shell-integration.zsh
installShellCompletion --fish $out/share/contour/shell-integration/shell-integration.fish
''
+ ''
echo "$terminfo" >> $out/nix-support/propagated-user-env-packages
'';
passthru.tests.test = nixosTests.terminal-emulators.contour;
meta = with lib; {
description = "Modern C++ Terminal Emulator";
homepage = "https://github.com/contour-terminal/contour";
changelog = "https://github.com/contour-terminal/contour/raw/v${version}/Changelog.md";
license = licenses.asl20;
maintainers = with maintainers; [ moni ];
platforms = platforms.unix;
mainProgram = "contour";
};
})

View File

@ -0,0 +1,29 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
enableAvx2 ? false,
}:
stdenv.mkDerivation (final: {
pname = "glaze";
version = "4.0.0";
src = fetchFromGitHub {
owner = "stephenberry";
repo = "glaze";
rev = "v${final.version}";
hash = "sha256-zaGKYEnYTyAhtP0Hywxp8Y33wvjB1RkEoOGF41CaVnY";
};
nativeBuildInputs = [ cmake ];
cmakeFlags = [ (lib.cmakeBool "glaze_ENABLE_AVX2" enableAvx2) ];
meta = with lib; {
description = "Extremely fast, in memory, JSON and interface library for modern C++";
platforms = platforms.all;
maintainers = with maintainers; [ moni ];
license = licenses.mit;
};
})

View File

@ -1,34 +1,50 @@
{ lib, stdenv, fetchFromGitHub, fetchzip, cmake, catch2, fmt, python3 }: {
lib,
stdenv,
fetchFromGitHub,
fetchzip,
cmake,
catch2_3,
fmt,
python3,
}:
let let
ucd-version = "15.0.0"; ucd-version = "16.0.0";
ucd-src = fetchzip { ucd-src = fetchzip {
url = "https://www.unicode.org/Public/${ucd-version}/ucd/UCD.zip"; url = "https://www.unicode.org/Public/${ucd-version}/ucd/UCD.zip";
hash = "sha256-jj6bX46VcnH7vpc9GwM9gArG+hSPbOGL6E4SaVd0s60="; hash = "sha256-GgEYjOLrxxfTAQsc2bpi7ShoAr3up8z7GXXpe+txFuw";
stripRoot = false; stripRoot = false;
}; };
in stdenv.mkDerivation (final: { in
stdenv.mkDerivation (final: {
pname = "libunicode"; pname = "libunicode";
version = "0.4.0"; version = "0.6.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "contour-terminal"; owner = "contour-terminal";
repo = "libunicode"; repo = "libunicode";
rev = "v${final.version}"; rev = "v${final.version}";
hash = "sha256-Us3T4fnGsArdsVB7IUhwdex43C+H1+lfL8yK9enhf2c="; hash = "sha256-zX33aTQ7Wgl8MABu+o6nA2HWrfXD4zQ9b3NDB+T2saI";
}; };
# Fix: set_target_properties Can not find target to add properties to: Catch2, et al. # Fix: set_target_properties Can not find target to add properties to: Catch2, et al.
patches = [ ./remove-target-properties.diff ]; patches = [ ./remove-target-properties.diff ];
nativeBuildInputs = [ cmake python3 ]; nativeBuildInputs = [
buildInputs = [ catch2 fmt ]; cmake
python3
];
buildInputs = [
catch2_3
fmt
];
cmakeFlags = [ "-DLIBUNICODE_UCD_DIR=${ucd-src}" ]; cmakeFlags = [ "-DLIBUNICODE_UCD_DIR=${ucd-src}" ];
meta = with lib; { meta = with lib; {
description = "Modern C++17 Unicode library"; description = "Modern C++20 Unicode library";
mainProgram = "unicode-query"; mainProgram = "unicode-query";
license = licenses.asl20; license = licenses.asl20;
platforms = platforms.unix; platforms = platforms.unix;

View File

@ -0,0 +1,19 @@
diff --git a/src/libunicode/CMakeLists.txt b/src/libunicode/CMakeLists.txt
index bb1a824..166834c 100644
--- a/src/libunicode/CMakeLists.txt
+++ b/src/libunicode/CMakeLists.txt
@@ -235,10 +235,10 @@ if(LIBUNICODE_TESTING)
# supress conversion warnings for Catch2
# https://github.com/catchorg/Catch2/issues/2583
# https://github.com/SFML/SFML/blob/e45628e2ebc5843baa3739781276fa85a54d4653/test/CMakeLists.txt#L18-L22
- set_target_properties(Catch2 PROPERTIES COMPILE_OPTIONS "" EXPORT_COMPILE_COMMANDS OFF)
- set_target_properties(Catch2WithMain PROPERTIES EXPORT_COMPILE_COMMANDS OFF)
- get_target_property(CATCH2_INCLUDE_DIRS Catch2 INTERFACE_INCLUDE_DIRECTORIES)
- target_include_directories(Catch2 SYSTEM INTERFACE ${CATCH2_INCLUDE_DIRS})
+ # set_target_properties(Catch2 PROPERTIES COMPILE_OPTIONS "" EXPORT_COMPILE_COMMANDS OFF)
+ # set_target_properties(Catch2WithMain PROPERTIES EXPORT_COMPILE_COMMANDS OFF)
+ # get_target_property(CATCH2_INCLUDE_DIRS Catch2 INTERFACE_INCLUDE_DIRECTORIES)
+ # target_include_directories(Catch2 SYSTEM INTERFACE ${CATCH2_INCLUDE_DIRS})
endif()
target_link_libraries(unicode_test unicode Catch2::Catch2WithMain)

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

View File

@ -1,19 +0,0 @@
diff --git a/src/libunicode/CMakeLists.txt b/src/libunicode/CMakeLists.txt
index 6c5ac20..9fa13a3 100644
--- a/src/libunicode/CMakeLists.txt
+++ b/src/libunicode/CMakeLists.txt
@@ -223,10 +223,10 @@ if(LIBUNICODE_TESTING)
# supress conversion warnings for Catch2
# https://github.com/catchorg/Catch2/issues/2583
# https://github.com/SFML/SFML/blob/e45628e2ebc5843baa3739781276fa85a54d4653/test/CMakeLists.txt#L18-L22
- set_target_properties(Catch2 PROPERTIES COMPILE_OPTIONS "" EXPORT_COMPILE_COMMANDS OFF)
- set_target_properties(Catch2WithMain PROPERTIES EXPORT_COMPILE_COMMANDS OFF)
- get_target_property(CATCH2_INCLUDE_DIRS Catch2 INTERFACE_INCLUDE_DIRECTORIES)
- target_include_directories(Catch2 SYSTEM INTERFACE ${CATCH2_INCLUDE_DIRS})
+ # set_target_properties(Catch2 PROPERTIES COMPILE_OPTIONS "" EXPORT_COMPILE_COMMANDS OFF)
+ # set_target_properties(Catch2WithMain PROPERTIES EXPORT_COMPILE_COMMANDS OFF)
+ # get_target_property(CATCH2_INCLUDE_DIRS Catch2 INTERFACE_INCLUDE_DIRECTORIES)
+ # target_include_directories(Catch2 SYSTEM INTERFACE ${CATCH2_INCLUDE_DIRS})
target_link_libraries(unicode_test unicode Catch2::Catch2WithMain fmt::fmt-header-only)
add_test(unicode_test unicode_test)

View File

@ -1532,12 +1532,9 @@ with pkgs;
### APPLICATIONS/TERMINAL-EMULATORS ### APPLICATIONS/TERMINAL-EMULATORS
contour = qt6.callPackage ../applications/terminal-emulators/contour { contour = callPackage ../by-name/co/contour/package.nix {
inherit (darwin.apple_sdk_11_0.libs) utmp; inherit (darwin) libutil sigtool;
inherit (darwin) sigtool; stdenv = if stdenv.hostPlatform.isDarwin then llvmPackages_17.stdenv else stdenv;
stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv;
catch2 = catch2_3;
fmt = fmt_9;
}; };
cool-retro-term = libsForQt5.callPackage ../applications/terminal-emulators/cool-retro-term { }; cool-retro-term = libsForQt5.callPackage ../applications/terminal-emulators/cool-retro-term { };
@ -10188,9 +10185,8 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) IOKit Security; inherit (darwin.apple_sdk.frameworks) IOKit Security;
}; };
libunicode = callPackage ../development/libraries/libunicode { libunicode = callPackage ../by-name/li/libunicode/package.nix {
catch2 = catch2_3; stdenv = if stdenv.hostPlatform.isDarwin then llvmPackages_17.stdenv else stdenv;
fmt = fmt_9;
}; };
libunwind = libunwind =
@ -11089,7 +11085,9 @@ with pkgs;
harfbuzz = harfbuzzFull; 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 = callPackage ../tools/typesetting/tex/texpresso {
texpresso-tectonic = callPackage ../tools/typesetting/tex/texpresso/tectonic.nix { }; texpresso-tectonic = callPackage ../tools/typesetting/tex/texpresso/tectonic.nix { };