libunicode: 0.4.0 -> 0.6.0
This commit is contained in:
parent
fcfcc8e0f4
commit
08151b58b3
@ -1,34 +1,50 @@
|
||||
{ lib, stdenv, fetchFromGitHub, fetchzip, cmake, catch2, fmt, python3 }:
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchzip,
|
||||
cmake,
|
||||
catch2_3,
|
||||
fmt,
|
||||
python3,
|
||||
}:
|
||||
|
||||
let
|
||||
ucd-version = "15.0.0";
|
||||
ucd-version = "16.0.0";
|
||||
|
||||
ucd-src = fetchzip {
|
||||
url = "https://www.unicode.org/Public/${ucd-version}/ucd/UCD.zip";
|
||||
hash = "sha256-jj6bX46VcnH7vpc9GwM9gArG+hSPbOGL6E4SaVd0s60=";
|
||||
hash = "sha256-GgEYjOLrxxfTAQsc2bpi7ShoAr3up8z7GXXpe+txFuw";
|
||||
stripRoot = false;
|
||||
};
|
||||
in stdenv.mkDerivation (final: {
|
||||
in
|
||||
stdenv.mkDerivation (final: {
|
||||
pname = "libunicode";
|
||||
version = "0.4.0";
|
||||
version = "0.6.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "contour-terminal";
|
||||
repo = "libunicode";
|
||||
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.
|
||||
patches = [ ./remove-target-properties.diff ];
|
||||
|
||||
nativeBuildInputs = [ cmake python3 ];
|
||||
buildInputs = [ catch2 fmt ];
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
python3
|
||||
];
|
||||
buildInputs = [
|
||||
catch2_3
|
||||
fmt
|
||||
];
|
||||
|
||||
cmakeFlags = [ "-DLIBUNICODE_UCD_DIR=${ucd-src}" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Modern C++17 Unicode library";
|
||||
description = "Modern C++20 Unicode library";
|
||||
mainProgram = "unicode-query";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.unix;
|
19
pkgs/by-name/li/libunicode/remove-target-properties.diff
Normal file
19
pkgs/by-name/li/libunicode/remove-target-properties.diff
Normal 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)
|
@ -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)
|
@ -10302,11 +10302,20 @@ with pkgs;
|
||||
inherit (darwin.apple_sdk.frameworks) IOKit Security;
|
||||
};
|
||||
|
||||
libunicode = callPackage ../development/libraries/libunicode {
|
||||
catch2 = catch2_3;
|
||||
fmt = fmt_9;
|
||||
libunicode = callPackage ../by-name/li/libunicode/package.nix {
|
||||
stdenv = if stdenv.hostPlatform.isDarwin then llvmPackages_17.stdenv else stdenv;
|
||||
};
|
||||
|
||||
libusbgx = callPackage ../development/libraries/libusbgx { };
|
||||
|
||||
libusbsio = callPackage ../development/libraries/libusbsio { };
|
||||
|
||||
libucontext = callPackage ../development/libraries/libucontext { };
|
||||
|
||||
libutempter = callPackage ../development/libraries/libutempter { };
|
||||
|
||||
libuldaq = callPackage ../development/libraries/libuldaq { };
|
||||
|
||||
libunwind =
|
||||
# Use the system unwinder in the SDK but provide a compatibility package to:
|
||||
# 1. avoid evaluation errors with setting `unwind` to `null`; and
|
||||
|
Loading…
Reference in New Issue
Block a user