2022-01-13 09:00:46 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromSourcehut
|
|
|
|
, SDL2
|
2022-01-31 07:43:17 +00:00
|
|
|
, SDL2_gfx
|
2022-01-13 09:00:46 +00:00
|
|
|
, SDL2_image
|
|
|
|
, SDL2_ttf
|
2023-07-10 01:54:36 +00:00
|
|
|
, busybox
|
|
|
|
, curl
|
2022-10-15 12:15:47 +00:00
|
|
|
, findutils
|
2023-07-10 01:54:36 +00:00
|
|
|
, geoclue2-with-demo-agent
|
|
|
|
, gpsd
|
2022-03-24 11:45:59 +00:00
|
|
|
, jq
|
2023-07-10 01:54:36 +00:00
|
|
|
, makeWrapper
|
2022-03-24 11:45:59 +00:00
|
|
|
, ncurses
|
2023-07-10 01:54:36 +00:00
|
|
|
, pkg-config
|
2022-10-15 12:15:47 +00:00
|
|
|
, util-linux
|
2023-07-10 01:54:36 +00:00
|
|
|
, xwininfo
|
|
|
|
, zenity
|
2023-08-13 23:35:33 +00:00
|
|
|
, zig_0_11
|
2022-01-13 09:00:46 +00:00
|
|
|
}:
|
|
|
|
|
2023-07-10 01:54:36 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2022-01-13 09:00:46 +00:00
|
|
|
pname = "mepo";
|
2023-08-13 23:35:33 +00:00
|
|
|
version = "1.2.0";
|
2022-01-13 09:00:46 +00:00
|
|
|
|
|
|
|
src = fetchFromSourcehut {
|
|
|
|
owner = "~mil";
|
2023-07-10 01:54:36 +00:00
|
|
|
repo = "mepo";
|
|
|
|
rev = finalAttrs.version;
|
2023-08-13 23:35:33 +00:00
|
|
|
hash = "sha256-sxN7yTnk3KDAkP/d3miKa2bEgB3AUaf9/M9ajJyRt3g=";
|
2022-01-13 09:00:46 +00:00
|
|
|
};
|
|
|
|
|
2023-07-10 01:54:36 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
2023-08-13 23:35:33 +00:00
|
|
|
zig_0_11.hook
|
2023-07-10 01:54:36 +00:00
|
|
|
makeWrapper
|
|
|
|
];
|
2022-01-13 09:00:46 +00:00
|
|
|
|
2022-03-24 11:45:59 +00:00
|
|
|
buildInputs = [
|
2023-07-10 01:54:36 +00:00
|
|
|
curl
|
|
|
|
SDL2
|
|
|
|
SDL2_gfx
|
|
|
|
SDL2_image
|
|
|
|
SDL2_ttf
|
|
|
|
jq
|
|
|
|
ncurses
|
2022-10-15 12:15:47 +00:00
|
|
|
];
|
2022-01-13 09:00:46 +00:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2023-07-10 01:54:36 +00:00
|
|
|
postInstall = ''
|
2022-10-15 12:15:47 +00:00
|
|
|
install -d $out/share/man/man1
|
|
|
|
$out/bin/mepo -docman > $out/share/man/man1/mepo.1
|
2022-01-13 09:00:46 +00:00
|
|
|
'';
|
|
|
|
|
2023-07-10 01:54:36 +00:00
|
|
|
postFixup = ''
|
2022-10-15 12:15:47 +00:00
|
|
|
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 \
|
2023-07-10 01:54:36 +00:00
|
|
|
--suffix PATH : $out/bin:${lib.makeBinPath ([
|
|
|
|
busybox
|
|
|
|
curl
|
|
|
|
findutils
|
|
|
|
gpsd
|
|
|
|
jq
|
|
|
|
ncurses
|
|
|
|
util-linux
|
|
|
|
xwininfo
|
|
|
|
zenity
|
|
|
|
])}
|
2022-03-24 11:45:59 +00:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2023-07-10 01:54:36 +00:00
|
|
|
meta = {
|
|
|
|
homepage = "https://mepo.milesalan.com";
|
2022-01-13 09:00:46 +00:00
|
|
|
description = "Fast, simple, and hackable OSM map viewer";
|
2022-10-15 12:15:47 +00:00
|
|
|
longDescription = ''
|
2023-07-10 01:54:36 +00:00
|
|
|
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.
|
2022-10-15 12:15:47 +00:00
|
|
|
'';
|
2023-07-10 01:54:36 +00:00
|
|
|
license = lib.licenses.gpl3Plus;
|
|
|
|
maintainers = with lib.maintainers; [ sikmir McSinyx laalsaas ];
|
|
|
|
platforms = lib.platforms.linux;
|
2022-01-13 09:00:46 +00:00
|
|
|
};
|
2023-07-10 01:54:36 +00:00
|
|
|
})
|