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