commit 26ebbe21b5cbc074adfeddf2b4f6c6e836888f2d
parent a2906f515052967edb10757e080555036b807eb8
Author: Daniel Barlow <dan@telent.net>
Date: Tue, 27 May 2025 13:31:54 +0100
hack in rxi-json
Diffstat:
3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/pkgs/maps/default.nix b/pkgs/maps/default.nix
@@ -34,11 +34,14 @@ let
hash = "sha256-VYr/DV1FAyzPe6p6Quc1nmsHup23IAMfz532rL167Q4=";
};
};
+ rxi-json = callPackage ../rxi-json { lua = lua5_3; };
lua = lua5_3.withPackages (ps: with ps; [
lgi
luafilesystem
luaposix
readline
+ http
+ rxi-json
]);
pname = "maps";
in stdenv.mkDerivation {
@@ -49,15 +52,12 @@ in stdenv.mkDerivation {
buildInputs = [
lua
gtk3.dev
- gobject-introspection # .dev
+ gobject-introspection
osm-gps-map
glib-networking
-# gdk-pixbuf
- # glib
-# libchamplain
];
nativeBuildInputs = [
- buildPackages.lua
+# lua
gobject-introspection
makeWrapper
fennel
@@ -65,6 +65,7 @@ in stdenv.mkDerivation {
copyDesktopItems
];
GIO_EXTRA_MODULES = [ "${glib-networking.out}/lib/gio/modules" ];
+ RXI_JSON="${rxi-json}/";
makeFlags = [ "PREFIX=${placeholder "out"}" "NAME=${pname}" ];
diff --git a/pkgs/maps/shell.nix b/pkgs/maps/shell.nix
@@ -4,6 +4,6 @@ in
package.overrideAttrs(o: {
shellHook = ''
export LUA_CPATH=$(lua -e "print(package.cpath)")
- export LUA_PATH=$(lua -e "print(package.path)")
+ export LUA_PATH=$(lua -e "print(package.path)")\;$RXI_JSON/share/lua/5.3/?.lua
'';
})
diff --git a/pkgs/maps/tiles.fnl b/pkgs/maps/tiles.fnl
@@ -1,7 +1,10 @@
(local req (require :http.request))
(local { : dict_to_query } (require :http.util))
+(local json (require :json))
+
(local { : view } (require :fennel))
+
(local
query
(->