harec and hare should always have the same qbe package. By exposing the
latter under harec's passthru attribute and using it as hare's qbe, we
assure that they will always hare the same qbe package even if there's a
need for a local overlay.
The mime module relies on the `/etc/mime.types` file. We may hardcode it
like the Golang recipe[0].
Also add a `passthru.tests.mimeModule` so that we can be certain that
the module is working.
[0]: f1010e0469/pkgs/development/compilers/go/1.22.nix (L79)
Hardcode qbe and harec to avoid the overhead of wrapping hare with a
bash script.
By doing that, we also had to change how `makeFlags` were defined: Now
only part of the `<ARCH>_<TOOL>` make variables are conditioned to the
enableCrossCompilation. The ones belonging to the build platform are
passed unconditionally.
Add qbe and harec to propagatedBuildInputs.
Some build frameworks may rely on having harec and qbe available on
PATH by setting `HAREC` and `QBE` to relative paths --- e. g., `haredo`.
Remove `CC` since it is not used.
Capitalize x86_64 (from `x86_64` to `X86_64`) to embed their values on
the binary.
Patch the `hare` command so that it has the `-v` option for the
`version` subcommand. With it, is much easier to check the paths of the
toolchains, since we do not need to rely on:
`strings <path-to-hare-binary> | grep <toolchain-path>`
Also strip the `HAREPATH` make variable embedded in the binary from
empty `$(SRCDIR)/hare/third-party`, since since nix does not follows the
FHS and relies on the `HAREPATH` environment variable to find third
party libraries.
And also:
- move platform and arch to outer let-in
- patch tzdata paths to use the nix store
- set `outputs` to `[ "out" "man" ]`
- append `nixpkgs` `hare version`'s output
- compact `postFixup` phase
- rework description
- move `binutils-unwrapped` only to `buildInputs`
[1]: https://nixpk.gs/pr-tracker.html?pr=265124