[Nix-dev] mxe on NixOS

Andrew Kelley superjoe30 at gmail.com
Mon Jul 27 17:13:20 CEST 2015


On Mon, Jul 27, 2015 at 1:36 AM Luca Bruno <lethalman88 at gmail.com> wrote:

> On 27/07/2015 07:36, Andrew Kelley wrote:
>
> mxe (M Cross Environment) is a way to cross compile for Windows. It's a
> pretty great project.
>
>  There's one hitch when using it on NixOS. I guess it expects
> /usr/share/aclocal/pkg.m4 to exist for some reason. I don't completely
> understand it and I'm still pretty new to NixOS. I was hoping to get some
> more experienced people to maybe chime in and point out what MXE could do
> to not break on NixOS.
>
>  Here's the upstream issue:
> https://github.com/mxe/mxe/issues/723#issuecomment-125044881
>
>  Any ideas?
>
> You are trying to build something outside of a nix build environment.
> Instead of calling make ecc. like you do on every other distro, in Nix
> things are very different. You should write a .nix file describing how the
> package should build and build it. It will be easier.
>
> Also 99% of the times errors like that are not an upstream issue but your
> own issue on nixos.
>

Thanks for the reply.

I think I did not succeed in explaining what MXE is and how it works. It
would not make sense to create a nix expression for mxe; one does not build
mxe like a normal application. Instead, one uses mxe to build for Windows.
So compiling software with mxe is more like running a normal application at
runtime rather than building a package.

I think one of two things is the case:

1. The MXE project depends on some hard coded path, and I'd like to try to
find out what that is and send a patch to MXE which would use the proper
way to detect the path instead.
2. autotools depends on some hard coded path, and I'd like to see if it's
possible to fix that bug on NixOS with a patch.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150727/c8ba6c74/attachment.html 


More information about the nix-dev mailing list