diff options
author | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-07-09 22:54:36 -0300 |
---|---|---|
committer | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-08-05 11:10:50 +0000 |
commit | ba1c193d28fe009594f93be3424b18f4e846c776 (patch) | |
tree | 869f6468fcf763e83f53c6f5a7cb83e8e1c0a1b1 /pkgs/applications/misc/mepo | |
parent | a34e8fe1617420b9df728834fe2a6b0f1b32417a (diff) |
mepo: use zigHook
Also, a cosmetic refactor: - Reorder parameter listing - Use rec-less, overlay-style overridable recursive attributes (in effect since NixOS#119942); - Remove nested with (according to https://nix.dev/recipes/best-practices#with-scopes)
Diffstat (limited to 'pkgs/applications/misc/mepo')
-rw-r--r-- | pkgs/applications/misc/mepo/default.nix | 94 |
1 files changed, 53 insertions, 41 deletions
diff --git a/pkgs/applications/misc/mepo/default.nix b/pkgs/applications/misc/mepo/default.nix index 5a7640c2414f6..680bb54a0ee1b 100644 --- a/pkgs/applications/misc/mepo/default.nix +++ b/pkgs/applications/misc/mepo/default.nix @@ -1,66 +1,60 @@ { lib , stdenv , fetchFromSourcehut -, pkg-config -, zig -, makeWrapper -, busybox -, curl , SDL2 , SDL2_gfx , SDL2_image , SDL2_ttf +, busybox +, curl , findutils +, geoclue2-with-demo-agent +, gpsd , jq +, makeWrapper , ncurses -, gnome -, xorg +, pkg-config , util-linux -, gpsd -, geoclue2-with-demo-agent +, xwininfo +, zenity +, zigHook }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "mepo"; version = "1.1"; src = fetchFromSourcehut { owner = "~mil"; - repo = pname; - rev = version; + repo = "mepo"; + rev = finalAttrs.version; hash = "sha256-OIZ617QLjiTiDwcsn0DnRussYtjDkVyifr2mdSqA98A="; }; - nativeBuildInputs = [ pkg-config zig makeWrapper ]; + nativeBuildInputs = [ + pkg-config + zigHook + makeWrapper + ]; buildInputs = [ - curl SDL2 SDL2_gfx SDL2_image SDL2_ttf jq ncurses + curl + SDL2 + SDL2_gfx + SDL2_image + SDL2_ttf + jq + ncurses ]; - preBuild = '' - export HOME=$TMPDIR - ''; - doCheck = true; - checkPhase = '' - runHook preCheck - - zig build test - - runHook postCheck - ''; - - installPhase = '' - runHook preInstall - zig build -Drelease-safe=true -Dcpu=baseline --prefix $out install + postInstall = '' install -d $out/share/man/man1 $out/bin/mepo -docman > $out/share/man/man1/mepo.1 - - runHook postInstall ''; - postInstall = '' + 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 \ @@ -68,19 +62,37 @@ stdenv.mkDerivation rec { --replace " ls " " ls -a " #circumvent wrapping for script detection for program in $out/bin/* ; do wrapProgram $program \ - --suffix PATH : $out/bin:${lib.makeBinPath ([ jq ncurses curl busybox findutils util-linux gpsd gnome.zenity xorg.xwininfo ])} + --suffix PATH : $out/bin:${lib.makeBinPath ([ + busybox + curl + findutils + gpsd + jq + ncurses + util-linux + xwininfo + zenity + ])} done ''; - meta = with lib; { + meta = { + homepage = "https://mepo.milesalan.com"; description = "Fast, simple, and hackable OSM map viewer"; longDescription = '' - It is recommended to use the corresponding NixOS module. + 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. ''; - - homepage = "https://mepo.milesalan.com"; - license = licenses.gpl3Plus; - maintainers = with maintainers; [ sikmir McSinyx laalsaas ]; - platforms = platforms.linux; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ sikmir McSinyx laalsaas ]; + platforms = lib.platforms.linux; }; -} +}) |