libunicode: 0.4.0 -> 0.6.0

+84 -59
+53
pkgs/by-name/li/libunicode/package.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchFromGitHub, 5 + fetchzip, 6 + cmake, 7 + catch2_3, 8 + fmt, 9 + python3, 10 + }: 11 + 12 + let 13 + ucd-version = "16.0.0"; 14 + 15 + ucd-src = fetchzip { 16 + url = "https://www.unicode.org/Public/${ucd-version}/ucd/UCD.zip"; 17 + hash = "sha256-GgEYjOLrxxfTAQsc2bpi7ShoAr3up8z7GXXpe+txFuw"; 18 + stripRoot = false; 19 + }; 20 + in 21 + stdenv.mkDerivation (final: { 22 + pname = "libunicode"; 23 + version = "0.6.0"; 24 + 25 + src = fetchFromGitHub { 26 + owner = "contour-terminal"; 27 + repo = "libunicode"; 28 + rev = "v${final.version}"; 29 + hash = "sha256-zX33aTQ7Wgl8MABu+o6nA2HWrfXD4zQ9b3NDB+T2saI"; 30 + }; 31 + 32 + # Fix: set_target_properties Can not find target to add properties to: Catch2, et al. 33 + patches = [ ./remove-target-properties.diff ]; 34 + 35 + nativeBuildInputs = [ 36 + cmake 37 + python3 38 + ]; 39 + buildInputs = [ 40 + catch2_3 41 + fmt 42 + ]; 43 + 44 + cmakeFlags = [ "-DLIBUNICODE_UCD_DIR=${ucd-src}" ]; 45 + 46 + meta = with lib; { 47 + description = "Modern C++20 Unicode library"; 48 + mainProgram = "unicode-query"; 49 + license = licenses.asl20; 50 + platforms = platforms.unix; 51 + maintainers = with maintainers; [ moni ]; 52 + }; 53 + })
+19
pkgs/by-name/li/libunicode/remove-target-properties.diff
··· 1 + diff --git a/src/libunicode/CMakeLists.txt b/src/libunicode/CMakeLists.txt 2 + index bb1a824..166834c 100644 3 + --- a/src/libunicode/CMakeLists.txt 4 + +++ b/src/libunicode/CMakeLists.txt 5 + @@ -235,10 +235,10 @@ if(LIBUNICODE_TESTING) 6 + # supress conversion warnings for Catch2 7 + # https://github.com/catchorg/Catch2/issues/2583 8 + # https://github.com/SFML/SFML/blob/e45628e2ebc5843baa3739781276fa85a54d4653/test/CMakeLists.txt#L18-L22 9 + - set_target_properties(Catch2 PROPERTIES COMPILE_OPTIONS "" EXPORT_COMPILE_COMMANDS OFF) 10 + - set_target_properties(Catch2WithMain PROPERTIES EXPORT_COMPILE_COMMANDS OFF) 11 + - get_target_property(CATCH2_INCLUDE_DIRS Catch2 INTERFACE_INCLUDE_DIRECTORIES) 12 + - target_include_directories(Catch2 SYSTEM INTERFACE ${CATCH2_INCLUDE_DIRS}) 13 + + # set_target_properties(Catch2 PROPERTIES COMPILE_OPTIONS "" EXPORT_COMPILE_COMMANDS OFF) 14 + + # set_target_properties(Catch2WithMain PROPERTIES EXPORT_COMPILE_COMMANDS OFF) 15 + + # get_target_property(CATCH2_INCLUDE_DIRS Catch2 INTERFACE_INCLUDE_DIRECTORIES) 16 + + # target_include_directories(Catch2 SYSTEM INTERFACE ${CATCH2_INCLUDE_DIRS}) 17 + endif() 18 + 19 + target_link_libraries(unicode_test unicode Catch2::Catch2WithMain)
-37
pkgs/development/libraries/libunicode/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, fetchzip, cmake, catch2, fmt, python3 }: 2 - 3 - let 4 - ucd-version = "15.0.0"; 5 - 6 - ucd-src = fetchzip { 7 - url = "https://www.unicode.org/Public/${ucd-version}/ucd/UCD.zip"; 8 - hash = "sha256-jj6bX46VcnH7vpc9GwM9gArG+hSPbOGL6E4SaVd0s60="; 9 - stripRoot = false; 10 - }; 11 - in stdenv.mkDerivation (final: { 12 - pname = "libunicode"; 13 - version = "0.4.0"; 14 - 15 - src = fetchFromGitHub { 16 - owner = "contour-terminal"; 17 - repo = "libunicode"; 18 - rev = "v${final.version}"; 19 - hash = "sha256-Us3T4fnGsArdsVB7IUhwdex43C+H1+lfL8yK9enhf2c="; 20 - }; 21 - 22 - # Fix: set_target_properties Can not find target to add properties to: Catch2, et al. 23 - patches = [ ./remove-target-properties.diff ]; 24 - 25 - nativeBuildInputs = [ cmake python3 ]; 26 - buildInputs = [ catch2 fmt ]; 27 - 28 - cmakeFlags = [ "-DLIBUNICODE_UCD_DIR=${ucd-src}" ]; 29 - 30 - meta = with lib; { 31 - description = "Modern C++17 Unicode library"; 32 - mainProgram = "unicode-query"; 33 - license = licenses.asl20; 34 - platforms = platforms.unix; 35 - maintainers = with maintainers; [ moni ]; 36 - }; 37 - })
-19
pkgs/development/libraries/libunicode/remove-target-properties.diff
··· 1 - diff --git a/src/libunicode/CMakeLists.txt b/src/libunicode/CMakeLists.txt 2 - index 6c5ac20..9fa13a3 100644 3 - --- a/src/libunicode/CMakeLists.txt 4 - +++ b/src/libunicode/CMakeLists.txt 5 - @@ -223,10 +223,10 @@ if(LIBUNICODE_TESTING) 6 - # supress conversion warnings for Catch2 7 - # https://github.com/catchorg/Catch2/issues/2583 8 - # https://github.com/SFML/SFML/blob/e45628e2ebc5843baa3739781276fa85a54d4653/test/CMakeLists.txt#L18-L22 9 - - set_target_properties(Catch2 PROPERTIES COMPILE_OPTIONS "" EXPORT_COMPILE_COMMANDS OFF) 10 - - set_target_properties(Catch2WithMain PROPERTIES EXPORT_COMPILE_COMMANDS OFF) 11 - - get_target_property(CATCH2_INCLUDE_DIRS Catch2 INTERFACE_INCLUDE_DIRECTORIES) 12 - - target_include_directories(Catch2 SYSTEM INTERFACE ${CATCH2_INCLUDE_DIRS}) 13 - + # set_target_properties(Catch2 PROPERTIES COMPILE_OPTIONS "" EXPORT_COMPILE_COMMANDS OFF) 14 - + # set_target_properties(Catch2WithMain PROPERTIES EXPORT_COMPILE_COMMANDS OFF) 15 - + # get_target_property(CATCH2_INCLUDE_DIRS Catch2 INTERFACE_INCLUDE_DIRECTORIES) 16 - + # target_include_directories(Catch2 SYSTEM INTERFACE ${CATCH2_INCLUDE_DIRS}) 17 - 18 - target_link_libraries(unicode_test unicode Catch2::Catch2WithMain fmt::fmt-header-only) 19 - add_test(unicode_test unicode_test)
+12 -3
pkgs/top-level/all-packages.nix
··· 10302 10302 inherit (darwin.apple_sdk.frameworks) IOKit Security; 10303 10303 }; 10304 10304 10305 - libunicode = callPackage ../development/libraries/libunicode { 10306 - catch2 = catch2_3; 10307 - fmt = fmt_9; 10305 + libunicode = callPackage ../by-name/li/libunicode/package.nix { 10306 + stdenv = if stdenv.hostPlatform.isDarwin then llvmPackages_17.stdenv else stdenv; 10308 10307 }; 10308 + 10309 + libusbgx = callPackage ../development/libraries/libusbgx { }; 10310 + 10311 + libusbsio = callPackage ../development/libraries/libusbsio { }; 10312 + 10313 + libucontext = callPackage ../development/libraries/libucontext { }; 10314 + 10315 + libutempter = callPackage ../development/libraries/libutempter { }; 10316 + 10317 + libuldaq = callPackage ../development/libraries/libuldaq { }; 10309 10318 10310 10319 libunwind = 10311 10320 # Use the system unwinder in the SDK but provide a compatibility package to: