Fix: materialize propagatedNativeBuildInputs file for runtimeInputs propagation (#231)
* Fix: write nix-support/propagated-native-build-inputs file
writeShellApplication uses writeTextFile internally, which does NOT
run stdenv.mkDerivation's fixupPhase. Setting propagatedNativeBuildInputs
via overrideAttrs only adds the attribute to the derivation but never
materializes the $out/nix-support/propagated-native-build-inputs file
that setup.sh's findInputs actually reads at runtime.
Without this file, curl was invisible to the shell environment despite
being set as a propagated dep — the wrapper script itself had curl on
its internal PATH, but other programs (like GHC's stage0 cabal) could
not find it.
Fix: explicitly create the nix-support file in postInstall.
* Fix: use buildCommand instead of postInstall for nix-support file
writeTextFile sets `buildCommand` in the derivation, which causes
stdenv's genericBuild to skip the entire phase system — installPhase,
postInstall, fixupPhase — none of them execute. The previous commit
used postInstall which was silently ignored, leaving the wrapper
output without nix-support/propagated-native-build-inputs.
Append the file creation directly to buildCommand, which is the only
code path the builder actually runs.