My build server which isn't using cache.nixos.org discovered an
outdated hash in servant:
```
trying https://github.com/haskell-servant/servant/archive/v0.16.2.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 132 0 132 0 0 616 0 --:--:-- --:--:-- --:--:-- 616
100 295k 0 295k 0 0 269k 0 --:--:-- 0:00:01 --:--:-- 384k
unpacking source archive /build/v0.16.2.tar.gz
hash mismatch in fixed-output derivation '/nix/store/i6qgxlqf599wl11rd44jasgmwb78wr6c-source':
wanted: sha256:0kqglih3rv12nmkzxvalhfaaafk4b2irvv9x5xmc48i1ns71y23l
got: sha256:0xk3czk3jhqjxhy0g8r2248m8yxgvmqhgn955k92z0h7p02lfs89
```
Previously the package conf files were handled without paying attention
to the fact that it's pretty-printed output. One problem was discovered
with GHC 8.8.1 on Darwin, where the dynamic-library-dirs first field
seems to have increased in length, meaning while before it was
dynamic-library-dirs: some-small-directory-name
some-more-directories
Now it is
dynamic-library-dirs:
some-larger-directory-name
some-more-directories
Which breaks the code installed for https://github.com/NixOS/nixpkgs/pull/25537,
because that assumed the former format, resulting in the reoccurence of
the bug in https://github.com/NixOS/nixpkgs/issues/22810, see
https://github.com/Infinisil/all-hies/issues/43
This commit fixes this by "unprettyfying" the package conf files before
processing them.
Closes https://github.com/NixOS/nixpkgs/pull/78738.
Bustle is proclaiming OtherLicense even though the code is licensed under LGPL 2.1+. This causes cabal2nix to set hydraPlatforms = stdenv.lib.platforms.none in hackage-packages.nix for the package.
Lets let's unset the attribute and fix the license.
This makes it work like work-on-multi from Reflex Platform. In
particular, rather than making `.env` from `shellFor`, we make `.env`
the primitive, and `shellFor` works by combining together the arguments
of all the packages to `generic-builder` and taking the `.env` of the
resulting mashup-package.
There are 2 benefits of this:
1. The dependency logic is deduplicated. generic builder just concatted
lists, whereas all the envs until now would sieve apart haskell and
system build inputs. Now, they both decide haskell vs system the same
way: according to the argument list and without reflection.
Consistency is good, especially because it mean that if the build
works, the shell is more likely to work.
2. Cross is handled better. For native builds, because the
`ghcWithPackages` calls would shadow, we through both the regular
component (lib, exe, test, bench) haskell deps and Setup.hs haskell
deps in the same `ghcWithPackages` call. But for cross builds we use
`buildPackages.ghcWithPackages` to get the setup deps. This ensures
everything works correctly.