nixpkgs/pkgs/applications/misc/mepo/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

99 lines
2.4 KiB
Nix
Raw Normal View History

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
, busybox
, curl
2022-10-15 12:15:47 +00:00
, findutils
, geoclue2-with-demo-agent
, gpsd
2022-03-24 11:45:59 +00:00
, jq
, makeWrapper
2022-03-24 11:45:59 +00:00
, ncurses
, pkg-config
2022-10-15 12:15:47 +00:00
, util-linux
, xwininfo
, zenity
2024-06-04 01:42:17 +00:00
, zig_0_12
2022-01-13 09:00:46 +00:00
}:
stdenv.mkDerivation (finalAttrs: {
2022-01-13 09:00:46 +00:00
pname = "mepo";
2024-06-04 01:42:17 +00:00
version = "1.2.1";
2022-01-13 09:00:46 +00:00
src = fetchFromSourcehut {
owner = "~mil";
repo = "mepo";
rev = finalAttrs.version;
2024-06-04 01:42:17 +00:00
hash = "sha256-Ii5E9TgUxzlVIdkKS/6RtasOETeclMm1yoU86gs4hB8=";
2022-01-13 09:00:46 +00:00
};
nativeBuildInputs = [
pkg-config
2024-06-04 01:42:17 +00:00
zig_0_12.hook
makeWrapper
];
2022-01-13 09:00:46 +00:00
2022-03-24 11:45:59 +00:00
buildInputs = [
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;
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
'';
postFixup = ''
2022-10-15 12:15:47 +00:00
substituteInPlace $out/bin/mepo_ui_menu_user_pin_updater.sh \
2024-06-04 01:42:17 +00:00
--replace-fail /usr/libexec/geoclue-2.0 ${geoclue2-with-demo-agent}/libexec/geoclue-2.0
2022-10-15 12:15:47 +00:00
substituteInPlace $out/bin/mepo_ui_central_menu.sh \
2024-06-04 01:42:17 +00:00
--replace-fail "grep mepo_" "grep '^\.mepo_\|^mepo_'" \
--replace-fail " ls " " ls -a " #circumvent wrapping for script detection
2022-10-15 12:15:47 +00:00
for program in $out/bin/* ; do
wrapProgram $program \
--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
'';
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 = ''
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
'';
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ sikmir McSinyx laalsaas ];
platforms = lib.platforms.linux;
2022-01-13 09:00:46 +00:00
};
})