summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2021-04-27 21:40:35 +0200
committerlassulus <lassulus@lassul.us>2021-04-27 21:40:35 +0200
commitaf6b58bc087f745b900d47b41764b29ac554917e (patch)
tree53da6a3c4819116a37599e8d1f7f302ff6e338e2 /krebs/5pkgs
parent9ae85f32e3c23fdd535ac3e905f1891ecba2923d (diff)
realwallpaper: move pkgs into export
Diffstat (limited to 'krebs/5pkgs')
-rw-r--r--krebs/5pkgs/simple/realwallpaper/default.nix23
1 files changed, 19 insertions, 4 deletions
diff --git a/krebs/5pkgs/simple/realwallpaper/default.nix b/krebs/5pkgs/simple/realwallpaper/default.nix
index 04a2a671..aafabb7b 100644
--- a/krebs/5pkgs/simple/realwallpaper/default.nix
+++ b/krebs/5pkgs/simple/realwallpaper/default.nix
@@ -1,6 +1,21 @@
{ pkgs, ... }:
pkgs.writers.writeDashBin "generate-wallpaper" ''
- set -euf
+ set -xeuf
+
+ export PATH=${with pkgs; lib.makeBinPath [
+ coreutils
+ curl
+ gnugrep
+ gnused
+ file
+ findutils
+ grib2json
+ imagemagick
+ inkscape
+ jq
+ nomads-cloud
+ xplanet
+ ]}
# usage: getimg FILENAME URL
fetch() {
@@ -118,7 +133,7 @@ pkgs.writers.writeDashBin "generate-wallpaper" ''
# fetch clouds if they are older than 3h
if ! test "$(find clouds-raw.png -mmin -180)"; then
- ${pkgs.nomads-cloud}/bin/nomads-cloud clouds-raw.png
+ nomads-cloud clouds-raw.png
fi
in_size=3600x1800
@@ -161,14 +176,14 @@ pkgs.writers.writeDashBin "generate-wallpaper" ''
fi
if needs_rebuild krebs.png krebs-raw.svg; then
- inkscape -z -e krebs.png -w 16 -h 16 krebs-raw.svg
+ inkscape --export-type="png" --export-width=16 --export-height=16 --export-filename=krebs.png krebs-raw.svg
fi
# -- Planets --
for planet in mercury venus mars jupiter saturn uranus neptune; do
if needs_rebuild "$planet".png "$planet"-raw.svg; then
sed -i 's/#000/#FE8019/g' "$planet"-raw.svg
- inkscape -z -e "$planet".png -w 40 -h 40 "$planet"-raw.svg
+ inkscape --export-type="png" --export-width=40 --export-height=40 --export-filename="$planet.png" "$planet-raw.svg"
fi
done