OB2MOPJ6NQDCF2OLLNHUR2JC4NQFNSNBRVFQJSF2USEI7ZMEX7HAC h We can also just run the executable directlyx nix run "$(dirname "${BASH_SOURCE[0]}")"h If we want to do development, we also get that \'for free\':f type gccx nix develop --command "$(dirname "${BASH_SOURCE[0]}")/demo-inside-nix-develop.sh"
#!/usr/bin/env bash# shellcheck disable=SC1010set -Eeuo pipefailsource "$(dirname "${BASH_SOURCE[0]}")/../bash/libdemo.sh"h Now we do have gcc!x type gcch But Nix does all sorts of clever things such as wrapping the compilerx file "$(command -v gcc)"h So that required libraries etc. are available# shellcheck disable=SC2016x eval 'echo "${NIX_LDFLAGS}"' \| grep -o --color=never -e \'\[^ \]*curl\[^ \]*\'h And we can in fact dox gcc -o "$(dirname "${BASH_SOURCE[0]}")/wttr-delft" -lcurl "$(dirname "${BASH_SOURCE[0]}")/../src/simple.c"x ./wttr-delft
02-nix-build/wttr-delft