Skip to content
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

generateOptparseApplicativeCompletion should do nothing if we are cross-compiling #174040

Closed
sternenseemann opened this issue May 22, 2022 · 1 comment
Labels
0.kind: bug 6.topic: cross-compilation Building packages on a different platform than they will be used on 6.topic: haskell

Comments

@sternenseemann
Copy link
Member

It works by executing the compiled and installed executable – something which won't work if we are cross compiling.

The fact that we are may be tricky to detect without introducing another dependency on pkgs in haskell.lib – something @Ericson2314 wanted to get rid of.

@sternenseemann sternenseemann added 0.kind: bug 6.topic: haskell 6.topic: cross-compilation Building packages on a different platform than they will be used on labels May 22, 2022
@marksisson
Copy link

#49748

sternenseemann added a commit to sternenseemann/nixpkgs that referenced this issue Oct 6, 2022
Deprecate haskell.lib{,.compose}.generateOptparseApplicativeCompletion*
in favor of the newly added
haskell.packages.*.generateOptparseApplicativeCompletions (plural!)
which takes into account whether we are cross-compiling or not. If we
are, generating completions is disabled, since we can't execute software
built for a different platform.

The move is necessary, so we can receive the /same/ stdenv as the
package we are overriding in order to accurately check whether we can
execute produced binaries.

Resolves NixOS#174040.
Resolves NixOS#49648.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug 6.topic: cross-compilation Building packages on a different platform than they will be used on 6.topic: haskell
Projects
None yet
Development

No branches or pull requests

2 participants