1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
{ lib
, stdenv
, fetchFromSourcehut
, SDL2
, SDL2_gfx
, SDL2_image
, SDL2_ttf
, busybox
, curl
, findutils
, geoclue2-with-demo-agent
, gpsd
, jq
, makeWrapper
, ncurses
, pkg-config
, util-linux
, xwininfo
, zenity
, zigHook
}:
stdenv.mkDerivation (finalAttrs: {
pname = "mepo";
version = "1.1";
src = fetchFromSourcehut {
owner = "~mil";
repo = "mepo";
rev = finalAttrs.version;
hash = "sha256-OIZ617QLjiTiDwcsn0DnRussYtjDkVyifr2mdSqA98A=";
};
nativeBuildInputs = [
pkg-config
zigHook
makeWrapper
];
buildInputs = [
curl
SDL2
SDL2_gfx
SDL2_image
SDL2_ttf
jq
ncurses
];
doCheck = true;
postInstall = ''
install -d $out/share/man/man1
$out/bin/mepo -docman > $out/share/man/man1/mepo.1
'';
postFixup = ''
substituteInPlace $out/bin/mepo_ui_menu_user_pin_updater.sh \
--replace /usr/libexec/geoclue-2.0 ${geoclue2-with-demo-agent}/libexec/geoclue-2.0
substituteInPlace $out/bin/mepo_ui_central_menu.sh \
--replace "grep mepo_" "grep '^\.mepo_\|^mepo_'" \
--replace " ls " " ls -a " #circumvent wrapping for script detection
for program in $out/bin/* ; do
wrapProgram $program \
--suffix PATH : $out/bin:${lib.makeBinPath ([
busybox
curl
findutils
gpsd
jq
ncurses
util-linux
xwininfo
zenity
])}
done
'';
meta = {
homepage = "https://mepo.milesalan.com";
description = "Fast, simple, and hackable OSM map viewer";
longDescription = ''
Mepo is a fast, simple, and hackable OSM map viewer for desktop & mobile
Linux devices (like the PinePhone, Librem 5, postmarketOS devices etc.)
and both environment's various user interfaces (Wayland & X
inclusive). Environments supported include Phosh, Sxmo, Plasma Mobile,
desktop X, and desktop Wayland. Mepo works both offline and online,
features a minimalist both touch/mouse and keyboard compatible interface,
and offers a UNIX-philosophy inspired underlying design, exposing a
powerful command language called Mepolang capable of being scripted to
provide things like custom bounding-box search scripts, bookmarks, and
more.
'';
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ sikmir McSinyx laalsaas ];
platforms = lib.platforms.linux;
};
})
|