tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
comaps: init at 2025.08.13-8
Ryan Omasta
5 months ago
8852657b
f4366b49
+163
3 changed files
expand all
collapse all
unified
split
pkgs
by-name
co
comaps
package.nix
remove-lto.patch
use-vendored-protobuf.patch
+106
pkgs/by-name/co/comaps/package.nix
···
1
1
+
{
2
2
+
lib,
3
3
+
organicmaps,
4
4
+
fetchurl,
5
5
+
fetchFromGitea,
6
6
+
boost,
7
7
+
gtest,
8
8
+
glm,
9
9
+
gflags,
10
10
+
imgui,
11
11
+
jansson,
12
12
+
python3,
13
13
+
optipng,
14
14
+
utf8cpp,
15
15
+
nix-update-script,
16
16
+
}:
17
17
+
let
18
18
+
mapRev = 250804;
19
19
+
20
20
+
worldMap = fetchurl {
21
21
+
url = "https://cdn-fi-1.comaps.app/maps/${toString mapRev}/World.mwm";
22
22
+
hash = "sha256-xYMH3y0Y6sSXYUTpy+A5YCyb+n5YChOXhyDvUFqXxZ0=";
23
23
+
};
24
24
+
25
25
+
worldCoasts = fetchurl {
26
26
+
url = "https://cdn-fi-1.comaps.app/maps/${toString mapRev}/WorldCoasts.mwm";
27
27
+
hash = "sha256-2vc4kkNX9bRTqXYlALfwVwOlvr122kvUk7pUyM91vjc=";
28
28
+
};
29
29
+
in
30
30
+
organicmaps.overrideAttrs (oldAttrs: rec {
31
31
+
pname = "comaps";
32
32
+
version = "2025.08.13-8";
33
33
+
34
34
+
src = fetchFromGitea {
35
35
+
domain = "codeberg.org";
36
36
+
owner = "comaps";
37
37
+
repo = "comaps";
38
38
+
tag = "v${version}";
39
39
+
hash = "sha256-kvE3H+siV/8v4WgsG1Ifd4gMMwGLqz28oXf1hB9gQ2Q=";
40
40
+
fetchSubmodules = true;
41
41
+
};
42
42
+
43
43
+
patches = [
44
44
+
./remove-lto.patch
45
45
+
./use-vendored-protobuf.patch
46
46
+
];
47
47
+
48
48
+
postPatch = (oldAttrs.postPatch or "") + ''
49
49
+
rm -f 3party/boost/b2
50
50
+
'';
51
51
+
52
52
+
nativeBuildInputs = (builtins.filter (x: x != python3) oldAttrs.nativeBuildInputs or [ ]) ++ [
53
53
+
(python3.withPackages (
54
54
+
ps: with ps; [
55
55
+
protobuf
56
56
+
]
57
57
+
))
58
58
+
optipng
59
59
+
];
60
60
+
61
61
+
buildInputs = (oldAttrs.buildInputs or [ ]) ++ [
62
62
+
boost
63
63
+
gtest
64
64
+
gflags
65
65
+
glm
66
66
+
imgui
67
67
+
jansson
68
68
+
utf8cpp
69
69
+
];
70
70
+
71
71
+
preConfigure = ''
72
72
+
bash ./configure.sh --skip-map-download
73
73
+
'';
74
74
+
75
75
+
cmakeFlags = [
76
76
+
(lib.cmakeBool "WITH_SYSTEM_PROVIDED_3PARTY" true)
77
77
+
];
78
78
+
79
79
+
env = {
80
80
+
NIX_CFLAGS_COMPILE = toString [
81
81
+
"-I/build/source/3party/fast_double_parser/include"
82
82
+
];
83
83
+
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python";
84
84
+
};
85
85
+
86
86
+
postInstall = ''
87
87
+
install -Dm644 ${worldMap} $out/share/comaps/data/World.mwm
88
88
+
install -Dm644 ${worldCoasts} $out/share/comaps/data/WorldCoasts.mwm
89
89
+
ln -s $out/bin/CoMaps $out/bin/comaps
90
90
+
'';
91
91
+
92
92
+
passthru.updateScript = nix-update-script {
93
93
+
extraArgs = [
94
94
+
"-vr"
95
95
+
"v(.*)"
96
96
+
];
97
97
+
};
98
98
+
99
99
+
meta = oldAttrs.meta // {
100
100
+
description = "Community-led fork of Organic Maps";
101
101
+
homepage = "https://comaps.app";
102
102
+
changelog = "https://codeberg.org/comaps/comaps/releases/tag/v${version}";
103
103
+
maintainers = [ lib.maintainers.ryand56 ];
104
104
+
mainProgram = "comaps";
105
105
+
};
106
106
+
})
+33
pkgs/by-name/co/comaps/remove-lto.patch
···
1
1
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2
2
+
index c559bf5..42ed617 100644
3
3
+
--- a/CMakeLists.txt
4
4
+
+++ b/CMakeLists.txt
5
5
+
@@ -106,7 +106,7 @@ if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
6
6
+
elseif (${CMAKE_BUILD_TYPE} MATCHES "Rel")
7
7
+
add_definitions(-DRELEASE)
8
8
+
if (NOT MSVC)
9
9
+
- add_compile_options(-O3 $<$<CXX_COMPILER_ID:GNU>:-flto=auto>)
10
10
+
+ add_compile_options(-O3)
11
11
+
endif()
12
12
+
else()
13
13
+
message(FATAL_ERROR "Unknown build type: " ${CMAKE_BUILD_TYPE})
14
14
+
@@ -116,19 +116,6 @@ if (${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")
15
15
+
add_compile_options(-fno-omit-frame-pointer)
16
16
+
endif()
17
17
+
18
18
+
-# Linux GCC LTO plugin fix.
19
19
+
-if (PLATFORM_LINUX AND (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_BUILD_TYPE MATCHES "^Rel"))
20
20
+
- # To force errors if LTO was not enabled.
21
21
+
- add_compile_options(-fno-fat-lto-objects)
22
22
+
- # To fix ar and ranlib "plugin needed to handle lto object".
23
23
+
- string(REGEX MATCH "[0-9]+" GCC_MAJOR_VERSION ${CMAKE_CXX_COMPILER_VERSION})
24
24
+
- file(GLOB_RECURSE plugin /usr/lib/gcc/*/${GCC_MAJOR_VERSION}/liblto_plugin.so)
25
25
+
- set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> --plugin ${plugin} qcs <TARGET> <OBJECTS>")
26
26
+
- set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> --plugin ${plugin} <TARGET>")
27
27
+
- set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> --plugin ${plugin} qcs <TARGET> <OBJECTS>")
28
28
+
- set(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> --plugin ${plugin} <TARGET>")
29
29
+
-endif()
30
30
+
-
31
31
+
message(STATUS "Build type: " ${CMAKE_BUILD_TYPE})
32
32
+
33
33
+
if (PLATFORM_LINUX OR PLATFORM_ANDROID)
+24
pkgs/by-name/co/comaps/use-vendored-protobuf.patch
···
1
1
+
diff --git a/3party/CMakeLists.txt b/3party/CMakeLists.txt
2
2
+
index 5178ae0..abe103f 100644
3
3
+
--- a/3party/CMakeLists.txt
4
4
+
+++ b/3party/CMakeLists.txt
5
5
+
@@ -41,9 +41,6 @@ if (NOT WITH_SYSTEM_PROVIDED_3PARTY)
6
6
+
# Add pugixml library.
7
7
+
add_subdirectory(pugixml)
8
8
+
9
9
+
- # Add protobuf library.
10
10
+
- add_subdirectory(protobuf)
11
11
+
-
12
12
+
if (NOT PLATFORM_LINUX)
13
13
+
add_subdirectory(freetype)
14
14
+
add_subdirectory(icu)
15
15
+
@@ -55,6 +52,9 @@ if (NOT WITH_SYSTEM_PROVIDED_3PARTY)
16
16
+
target_include_directories(utf8cpp INTERFACE "${OMIM_ROOT}/3party/utfcpp/source")
17
17
+
endif()
18
18
+
19
19
+
+# Add protobuf library.
20
20
+
+add_subdirectory(protobuf)
21
21
+
+
22
22
+
add_subdirectory(agg)
23
23
+
add_subdirectory(bsdiff-courgette)
24
24
+
add_subdirectory(minizip)