summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2022-11-21 16:02:33 +0100
committerlassulus <lassulus@lassul.us>2022-11-21 16:02:33 +0100
commitb7ea134764d642a1f9f97454caccf01ffa61c653 (patch)
tree0e4cb6b3f68ee4d76fe6273f038f2ae0185d2cde
parentbe3762d35106bff34c24987fdc2c3fc3d44a54c5 (diff)
reaktor2 18@p: fix PATH
-rw-r--r--krebs/2configs/reaktor2.nix11
1 files changed, 8 insertions, 3 deletions
diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix
index 6768a2004..3e88c0899 100644
--- a/krebs/2configs/reaktor2.nix
+++ b/krebs/2configs/reaktor2.nix
@@ -226,6 +226,12 @@ let
osm-restaurants = pkgs.callPackage "${osm-restaurants-src}/osm-restaurants" {};
in pkgs.writeDash "krebsfood" ''
set -efu
+ export PATH=${makeBinPath [
+ osm-restaurants
+ pkgs.coreutils
+ pkgs.curl
+ pkgs.jq
+ ]}
poi=$(curl -fsS http://c.r/poi.json | jq --arg name "$1" '.[$name]')
if [ "$poi" = null ]; then
latitude=52.51252
@@ -235,9 +241,8 @@ let
longitude=$(echo "$poi" | jq -r .longitude)
fi
- ${osm-restaurants}/bin/osm-restaurants --radius "$2" --latitude "$latitude" --longitude "$longitude" \
- | ${pkgs.jq}/bin/jq -r '"How about \(.tags.name) (https://www.openstreetmap.org/\(.type)/\(.id)), open \(.tags.opening_hours)?"'
- '
+ osm-restaurants --radius "$2" --latitude "$latitude" --longitude "$longitude" \
+ | jq -r '"How about \(.tags.name) (https://www.openstreetmap.org/\(.type)/\(.id)), open \(.tags.opening_hours)?"'
'';
};
}