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

Open
wants to merge 1 commit into
base: master
from

Conversation

@PombeirP
Copy link
Contributor

commented Apr 5, 2019

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.

@PombeirP PombeirP force-pushed the status-im:gomobile branch from fe80c15 to 88c7d31 Apr 6, 2019

@PombeirP

This comment has been minimized.

Copy link
Contributor Author

commented Apr 6, 2019

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

@samueldr

This comment has been minimized.

Copy link
Member

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.

@PombeirP PombeirP force-pushed the status-im:gomobile branch from 88c7d31 to f79a8ea Apr 8, 2019

@PombeirP

This comment has been minimized.

Copy link
Contributor Author

commented Apr 8, 2019

Thanks for the insight @samueldr! will try that

@PombeirP

This comment has been minimized.

Copy link
Contributor Author

commented Apr 8, 2019

Hmm, there's still an issue there.

@samueldr

This comment has been minimized.

Copy link
Member

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.

@PombeirP

This comment has been minimized.

Copy link
Contributor Author

commented Apr 9, 2019

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

@xeji

This comment has been minimized.

Copy link
Contributor

commented Apr 13, 2019

@GrahamcOfBorg build gomobile

@xeji
Copy link
Contributor

left a comment

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

@PombeirP

This comment has been minimized.

Copy link
Contributor Author

commented Apr 15, 2019

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.

@PombeirP PombeirP force-pushed the status-im:gomobile branch from 8b4e5a9 to 538a0f1 May 6, 2019

@PombeirP

This comment has been minimized.

Copy link
Contributor Author

commented May 6, 2019

@GrahamcOfBorg build gomobile

@PombeirP PombeirP force-pushed the status-im:gomobile branch 2 times, most recently from 3a24812 to 83048b4 Aug 23, 2019

@PombeirP PombeirP force-pushed the status-im:gomobile branch from 83048b4 to afa90c9 Aug 23, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.