Update 02
[?]
Mar 21, 2023, 12:59 PM
OB2MOPJ6NQDCF2OLLNHUR2JC4NQFNSNBRVFQJSF2USEI7ZMEX7HACDependencies
Change contents
- edit in 02-nix-build/flake.nix at line 27
# Note: If we were using Make/CMake/autoconf, the mkDerivation function# could handle those automatically. - replacement in 02-nix-build/demo.sh at line 2
# shellcheck disable=SC2288# shellcheck disable=SC1010,SC2288 - edit in 02-nix-build/demo.sh at line 42[2.792]
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" - file addition: demo-inside-nix-develop.sh[3.2636]
#!/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 - edit in .gitignore at line 2[2.805]
02-nix-build/wttr-delft