-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for cross-compilation with Nix #44
base: master
Are you sure you want to change the base?
Changes from 1 commit
71c6555
3820899
2c205d4
f3995bd
f32b194
08fa95c
2725c68
814b4cc
51ce5b4
fb64207
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,11 @@ | |
shell = { inherit crossPlatforms; }; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This But right now, that's working and the other isn't. |
||
}); | ||
}) | ||
|
||
haskellNix.overlay | ||
(final: prev: prev.lib.optionalAttrs prev.stdenv.hostPlatform.isMusl { | ||
libevdev = prev.libevdev.overrideAttrs (_: { dontDisableStatic = true; }); | ||
}) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I should upstream this patch somehow, as initially suggested on Reddit. |
||
]; | ||
pkgs = import nixpkgs { inherit system overlays; inherit (haskellNix) config; }; | ||
in | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to support
nix build
, rather than just*-cabal
withinnix develop
(more on that elsewhere), we need to addconfigureArgs = "-frelease";
here if we don't want the builtmonpad
to rely on finding thersc
folder. This is annoying because:file-embed
.nix build .#monpad:exe:monpad
fails with:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does now! I think what changed is that I'm now working from a clean checkout. Somehow a dirty git working dir gets in the way.EDIT: got too excited - as stated above this currently builds a version with no embedded filesThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hacked a solution in 814b4cc, but I should probably make those dependencies tracked by Nix, or something. I also have a
no-symlinks
stash forBuild.hs
modifications (although I'm not sure that's the best approach either, given assets need to be known to Git and I don't want duplicates).