Move Rust build into its own flake at rust/flake.nix using crane, and
reference it as an input from the top-level flake. The Haskell build
gets the Rust artifacts (header + static lib) via a haskell.nix
override that symlinks them into place before configure.
Use Cabal's Cgarnet_rs naming convention for extra-bundled-libraries
to satisfy the shared library install phase naming requirements.
Also extract inputs.nix, default.nix, and shell.nix for flake-compat
(nix-build / nix-shell) support.
This reverts commit 1f1c0d959da699ce04f7951ecbcdb7976c8c0750.
This doesn't work well with multi-component builds. For example, it requires `"haskell.sessionLoading": "singleComponent"` in VSCode, which makes HLS work less reliably.
The script addition is a bit hacky, but there's no obvious straightforward arch/version-independent way to get most of the build path. And eventually, once issues with HLS etc. are sorted out we will revert to using Cabal hooks anyway.