diff options
author | lassulus <lassulus@lassul.us> | 2021-04-27 21:40:35 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2021-05-15 13:11:34 +0200 |
commit | 6674b6c0a98e3dbf212d5c36e6f6d7f17a4d5df5 (patch) | |
tree | 2f7ef096076e00114f8a5937da8278490190b4de /krebs/5pkgs/simple | |
parent | 90bea335fd5edb15771df002468d0b5c50c472df (diff) |
realwallpaper: move pkgs into export
Diffstat (limited to 'krebs/5pkgs/simple')
-rw-r--r-- | krebs/5pkgs/simple/realwallpaper/default.nix | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/krebs/5pkgs/simple/realwallpaper/default.nix b/krebs/5pkgs/simple/realwallpaper/default.nix index 04a2a6718..aafabb7b6 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 |