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

gomobile: init at 20190319-167ebed #59018

Closed
wants to merge 1 commit into from
Closed

gomobile: init at 20190319-167ebed #59018

wants to merge 1 commit into from

Conversation

pedropombeiro
Copy link
Contributor

Motivation for this change

Add the gomobile tool which allows targetting mobile devices with Go.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@pedropombeiro
Copy link
Contributor Author

Not sure what is wrong based on the bot message. How can I reproduce/fix it?

@samueldr
Copy link
Member

samueldr commented Apr 7, 2019

I got a trace for the failure:

error: while evaluating anonymous function at /Users/samuel/tmp/ofborg/ofborg/src/outpaths.nix:44:12, called from undefined position:
while evaluating anonymous function at /Users/samuel/tmp/nixpkgs/nixpkgs-PR59018/pkgs/top-level/release-lib.nix:121:6, called from /Users/samuel/tmp/nixpkgs/nixpkgs-PR59018/lib/attrsets.nix:292:43:
while evaluating 'hydraJob' at /Users/samuel/tmp/nixpkgs/nixpkgs-PR59018/lib/customisation.nix:157:14, called from /Users/samuel/tmp/nixpkgs/nixpkgs-PR59018/pkgs/top-level/release-lib.nix:121:14:
while evaluating the attribute 'drvPath' at /Users/samuel/tmp/nixpkgs/nixpkgs-PR59018/lib/customisation.nix:174:13:
while evaluating the attribute 'drvPath' at /Users/samuel/tmp/nixpkgs/nixpkgs-PR59018/lib/customisation.nix:141:13:
while evaluating the attribute 'buildInputs' of the derivation 'gomobile-20190319-167ebed' at /Users/samuel/tmp/nixpkgs/nixpkgs-PR59018/lib/attrsets.nix:194:41:
cannot coerce a function to a string, at /Users/samuel/tmp/nixpkgs/nixpkgs-PR59018/lib/attrsets.nix:194:41

It's related to the meta.platform attribute.

Of note, it shouldn't really be unix unless it is known to build and work on all unices. If you meant "works on Linux and macOS" it would be more prudent to concat linux and darwin's platforms. e.g. platforms = platforms.linux ++ platforms.darwin;.

I'm not sure why the unix platform fails like that, but using linux instead does eval.

@pedropombeiro
Copy link
Contributor Author

Thanks for the insight @samueldr! will try that

@pedropombeiro
Copy link
Contributor Author

Hmm, there's still an issue there.

@samueldr
Copy link
Member

samueldr commented Apr 8, 2019

Here are the instructions to run the meta checks locally:

With preliminary testing it looks like it doesn't eval for darwin; it will eval with only linux as a platform, and will not eval with only darwin as a platform. This points towards it not evaluating on darwin.

Preliminary look, cannot coerce a function to a string is the kind of error you'll see when trying to use something that's not derivation like a derivation would be used. I'm thinking that xcodeenv.composeXcodeWrapper is being misused as xcodeWrapper; but I do not know how as I know next to nothing to how Nixpkgs works on Darwin.

@pedropombeiro
Copy link
Contributor Author

Thanks, you were right, I was using composeXcodeWrapper as a function because I wasn't passing the arguments. Fixed.

@xeji
Copy link
Contributor

xeji commented Apr 13, 2019

@GrahamcOfBorg build gomobile

Copy link
Contributor

@xeji xeji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix build failure, see logs. Apparently a patch fails to apply.

@pedropombeiro
Copy link
Contributor Author

Thanks for the heads up. It's weird that the patch fails to apply, as I'm checking out a precise revision of the source, and this same gomobile/default.nix is working on a project I'm working on.

@pedropombeiro
Copy link
Contributor Author

@GrahamcOfBorg build gomobile

@jakubgs jakubgs mentioned this pull request Mar 18, 2021
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants