Closed manveru closed 1 year ago
Hi there, thanks for the feedback, I haven't considered that use case before!
I added a new option, devGhc.crossPkgs
, that allows you to specify a different base set using devGhc.pkgs
.
I created an example test case using musl64
and static executables: https://github.com/tek/hix/blob/main/test/cross/root/flake.nix
Appears to work, but if you have any suggestions for how to improve the API or if you're missing something, I'd be happy to implement that!
In that example, you'd have to run nix build .#static
to get the desired output.
For the record, a more "canonical" way of adding a static package could be:
{
outputs = { self, hix, ... }:
hix.lib.flake ({ config, ... }: {
outputs.packages.static =
config.pkgs.haskell.lib.justStaticExecutables self.packages.${config.system}.root;
});
}
Is there a way to statically compile executables? I can't really find a good way to override the
devGhc
and thehaskellPackages
withpkgs.pkgsCross.musl64.haskellPackages
.