reaktor2 18@p: fix PATH
This commit is contained in:
parent
be3762d351
commit
b7ea134764
@ -226,6 +226,12 @@ let
|
|||||||
osm-restaurants = pkgs.callPackage "${osm-restaurants-src}/osm-restaurants" {};
|
osm-restaurants = pkgs.callPackage "${osm-restaurants-src}/osm-restaurants" {};
|
||||||
in pkgs.writeDash "krebsfood" ''
|
in pkgs.writeDash "krebsfood" ''
|
||||||
set -efu
|
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]')
|
poi=$(curl -fsS http://c.r/poi.json | jq --arg name "$1" '.[$name]')
|
||||||
if [ "$poi" = null ]; then
|
if [ "$poi" = null ]; then
|
||||||
latitude=52.51252
|
latitude=52.51252
|
||||||
@ -235,9 +241,8 @@ let
|
|||||||
longitude=$(echo "$poi" | jq -r .longitude)
|
longitude=$(echo "$poi" | jq -r .longitude)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
${osm-restaurants}/bin/osm-restaurants --radius "$2" --latitude "$latitude" --longitude "$longitude" \
|
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)?"'
|
| jq -r '"How about \(.tags.name) (https://www.openstreetmap.org/\(.type)/\(.id)), open \(.tags.opening_hours)?"'
|
||||||
'
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user