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

Firefox on Darwin #44186

Merged
merged 7 commits into from Aug 12, 2018
Merged

Firefox on Darwin #44186

merged 7 commits into from Aug 12, 2018

Conversation

matthewbauer
Copy link
Member

Motivation for this change

This is my working attempt to get Firefox working on Darwin/macOS. This will fix #30285.

Unfortunately this is a mass rebuild because of 0078e82ac240d88e3a20afcbf134904cbf920893. Unless there is legitimate reason for leaving it out I will probably just push that commit to staging. Anyway I am still waiting on things here but should be ready to go in a day or two.

@matthewbauer matthewbauer requested a review from LnL7 July 29, 2018 04:19
@GrahamcOfBorg GrahamcOfBorg added the 6.topic: darwin Running or building packages on Darwin label Jul 29, 2018
@grahamc
Copy link
Member

grahamc commented Jul 29, 2018

I think in the past we've sort of stayed away from trying to have well-packaged GUI apps on Darwin. I'd like to get some feedback from the two "high level" maintainers on that front on if they're interested in changing that direction: @LnL7 @copumpkin

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: libuv, xcbuild

The following builds were skipped because they don't evaluate on aarch64-linux: darwin.objc4

Partial log (click to expand)

building '/nix/store/p5z6pzchksyg71vb0s6s67s7131sn6nh-xcrun.drv'...
copying path '/nix/store/gdjasgil4na1fs4ygq4lc7q9lwjsi9x8-binutils-wrapper-2.30' from 'https://cache.nixos.org'...
copying path '/nix/store/2qis35nlk99gp830171xp192vzc2z919-gcc-wrapper-7.3.0' from 'https://cache.nixos.org'...
building '/nix/store/rks6y8y3jdq7s38b5hqs7ds3ls4f78c3-Toolchains.drv'...
building '/nix/store/qbcsqnazc6rsq75y1mqdi5q586j78j4x-xcodebuild-0.1.2-pre.drv'...
shrinking RPATHs of ELF executables and libraries in /nix/store/pdrvsb548nzidak1g0c9ay91dai2h2wx-xcodebuild-0.1.2-pre
patching script interpreter paths in /nix/store/pdrvsb548nzidak1g0c9ay91dai2h2wx-xcodebuild-0.1.2-pre
checking for references to /build in /nix/store/pdrvsb548nzidak1g0c9ay91dai2h2wx-xcodebuild-0.1.2-pre...
/nix/store/4ixyv8h34iw1kbb41lgpqq3xs2ap35hy-libuv-1.21.0
/nix/store/pdrvsb548nzidak1g0c9ay91dai2h2wx-xcodebuild-0.1.2-pre

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: libuv, xcbuild

The following builds were skipped because they don't evaluate on x86_64-linux: darwin.objc4

Partial log (click to expand)

building '/nix/store/0cp3daxrrdk43rvkcz6njakw77hchgcp-SDKs.drv'...
building '/nix/store/glfg6s8d6dfqshln2qs436w0cf47yw9r-Toolchains.drv'...
building '/nix/store/db0f7yip31rbni09545fsv87ibdrlk6z-Platforms.drv'...
building '/nix/store/j91ss9m3gydx205ydcyfyq1kbrpcx2x2-xcrun.drv'...
building '/nix/store/lw3vpc83ksj8c3pbjmm50j7n34a86h3a-xcodebuild-0.1.2-pre.drv'...
shrinking RPATHs of ELF executables and libraries in /nix/store/i792xr90vkp6bsmy4q9h0zvqghk9ahlh-xcodebuild-0.1.2-pre
patching script interpreter paths in /nix/store/i792xr90vkp6bsmy4q9h0zvqghk9ahlh-xcodebuild-0.1.2-pre
checking for references to /build in /nix/store/i792xr90vkp6bsmy4q9h0zvqghk9ahlh-xcodebuild-0.1.2-pre...
/nix/store/2r1mql4jqwm9ydq4bq8vhhh7b8a1lky5-libuv-1.21.0
/nix/store/i792xr90vkp6bsmy4q9h0zvqghk9ahlh-xcodebuild-0.1.2-pre

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: darwin.objc4, libuv, xcbuild

Partial log (click to expand)

cannot build derivation '/nix/store/di4yx5m758307v95ridys2qc52f6m9fd-apple-framework-Security.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/7j5v6ynzzsx81wqx3m6m8jzycfsp75w1-apple-framework-Accelerate.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/68svpqx85ln40vai960c3qv8kf981jc7-apple-framework-ServiceManagement.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/p6798cmj6il0dchpx7gb9g97as6gjxpr-apple-framework-SystemConfiguration.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/1nbwvn89lwlgmqk9bh6p6184n01rh7w2-apple-framework-CoreGraphics.drv': 7 dependencies couldn't be built
cannot build derivation '/nix/store/dcp8s0plbr7kiksd5kqwga5srfdyiap5-apple-framework-CoreServices.drv': 11 dependencies couldn't be built
cannot build derivation '/nix/store/yngxibi166ildbw3xwvxw8axzcwk56v9-apple-framework-ImageIO.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/prfxmw0gayijq9mis0i40rjnpqyjysdf-xcbuild-0.1.2-pre.drv': 8 dependencies couldn't be built
cannot build derivation '/nix/store/v4nvqrjcs3pm8vikf8p9ja4swr75y54a-xcodebuild-0.1.2-pre.drv': 8 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/m58483bhf3cis5mmpbqxvv85z3l07ajh-objc4-osx-10.11.6.drv', '/nix/store/shwgifkax6pgj8ys0dbz24cy4c3rnxnf-libuv-1.21.0.drv', '/nix/store/v4nvqrjcs3pm8vikf8p9ja4swr75y54a-xcodebuild-0.1.2-pre.drv' failed

@copumpkin
Copy link
Member

copumpkin commented Jul 31, 2018

Yeah, the no GUI apps thing wasn't really deliberate though. It mostly resulted from the lack of a viable FOSS nib/xib processing toolchain and general lack of good support from the resulting .apps (we've discussed possible strategies for integrating them into ~/Applications but haven't really done much as a result).

I can't speak for @LnL7, but I definitely welcome (erm, this is awesome) seeing more working GUI apps on Darwin, especially of the flavor that don't require xcode to build 😄

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: darwin.objc4, libuv, xcbuild

Partial log (click to expand)

building '/nix/store/6har1nhh1zsmh03f16qbaya20jqk2k4m-xcode-select.drv'...
building '/nix/store/1cg68mng3b0571qvhd53jjzdb1rphb5j-Platforms.drv'...
building '/nix/store/gdiryq8xa8dycfp7pbm4202xqwwwbn9h-xcrun.drv'...
copying path '/nix/store/rq1mmq43172c2mbx3k62rh0k73605vyr-clang-wrapper-5.0.2' from 'https://cache.nixos.org'...
building '/nix/store/jjawvh8n38914hq2ldzwpqb903qv3cql-Toolchains.drv'...
building '/nix/store/fim00f86db9wqhwvy9sdg012h6rmn9dn-xcodebuild-0.1.2-pre.drv'...
patching script interpreter paths in /nix/store/i1w4mkfpnzc3k85ppvzm1c7ij3f3kfib-xcodebuild-0.1.2-pre
/nix/store/946a6sffinz3gqdachx9s8q0zr98cxj8-objc4-osx-10.11.6
/nix/store/77fr454yin5kncd81pvmygig304a6qyv-libuv-1.21.0
/nix/store/i1w4mkfpnzc3k85ppvzm1c7ij3f3kfib-xcodebuild-0.1.2-pre

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: libuv, xcbuild

The following builds were skipped because they don't evaluate on x86_64-linux: darwin.objc4

Partial log (click to expand)

building '/nix/store/liyknf0wrazv0lasb6vrz338k8rg8d6k-SDKs.drv'...
building '/nix/store/wsw4pm0k1j6lr95p22hclaifnvbya8hm-Toolchains.drv'...
building '/nix/store/d50ydvrcdgk9pk2isndashnyj98d7l79-Platforms.drv'...
building '/nix/store/rra783hxqmmkwr0cvqcgd7zq3hfzki5z-xcrun.drv'...
building '/nix/store/0qdwa98w2v0sb8z9v0blfw7f77i8ilmv-xcodebuild-0.1.2-pre.drv'...
shrinking RPATHs of ELF executables and libraries in /nix/store/vzi8rhh1n8r2lyl1m7wkryzl0m0c420w-xcodebuild-0.1.2-pre
patching script interpreter paths in /nix/store/vzi8rhh1n8r2lyl1m7wkryzl0m0c420w-xcodebuild-0.1.2-pre
checking for references to /build in /nix/store/vzi8rhh1n8r2lyl1m7wkryzl0m0c420w-xcodebuild-0.1.2-pre...
/nix/store/3jzza70h4xlcl65py98y0ddq3sr3nv6z-libuv-1.21.0
/nix/store/vzi8rhh1n8r2lyl1m7wkryzl0m0c420w-xcodebuild-0.1.2-pre

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: libuv, xcbuild

The following builds were skipped because they don't evaluate on aarch64-linux: darwin.objc4

Partial log (click to expand)

building '/nix/store/28150j8mkcz4ay8zmn64d3jjhqv1xgin-SDKs.drv'...
building '/nix/store/ymxygrpa21nfjxrdj3lb000r965w71jr-Toolchains.drv'...
building '/nix/store/98kqlk6iq2v7z8zx9czkv80f1ya68857-Platforms.drv'...
building '/nix/store/fb0jbv1jf1ign2fvvkxs2l0r4k69dby7-xcrun.drv'...
building '/nix/store/5zf2j4i088x50acnhxi3sr2rng7x9nqd-xcodebuild-0.1.2-pre.drv'...
shrinking RPATHs of ELF executables and libraries in /nix/store/z844pw4bkn2aypd1wj99r527ng287v7q-xcodebuild-0.1.2-pre
patching script interpreter paths in /nix/store/z844pw4bkn2aypd1wj99r527ng287v7q-xcodebuild-0.1.2-pre
checking for references to /build in /nix/store/z844pw4bkn2aypd1wj99r527ng287v7q-xcodebuild-0.1.2-pre...
/nix/store/y36n3hmfz9nnx3ljix07yzd091x9lvf3-libuv-1.21.0
/nix/store/z844pw4bkn2aypd1wj99r527ng287v7q-xcodebuild-0.1.2-pre

--install) ;; # noop
esac
shift
done
'';

xcrun = writeText "xcrun" ''
#!/usr/bin/env sh
#!${bash}/bin/sh
Copy link
Member

Choose a reason for hiding this comment

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

you can use stdenv.shell

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks! Can change to that.

# uses LLVM's libclang. To make sure all necessary flags are
# included we need to look in a few places.
# TODO: generalize this process for other use-cases.
echo "ac_add_options BINDGEN_CFLAGS='$(< ${stdenv.cc}/nix-support/libc-cflags) $(< ${stdenv.cc}/nix-support/cc-cflags) ${stdenv.cc.default_cxx_stdlib_compile} -idirafter ${llvmPackages.clang.cc}/lib/clang/${lib.getVersion llvmPackages.clang}/include $NIX_CFLAGS_COMPILE'" >> $MOZCONFIG
Copy link
Member

Choose a reason for hiding this comment

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

this looks a bit brittle

@LnL7
Copy link
Member

LnL7 commented Aug 1, 2018

I don't have a problem with adding GUI applications. That said they generally seem to be much harder to maintain so if it's too much of a burden we shouldn't keep it in the release blockers, but let's just see how it goes.

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: xcbuild

Partial log (click to expand)

copying path '/nix/store/l492nxz6bv0zscg0wm35rk7jzpwj334i-unifdef-2.6' from 'https://cache.nixos.org'...
building '/nix/store/x15f7kr2zj0w33984fw2p8md7jcq9d79-Toolchains.drv'...
building '/nix/store/y787wi6fbdypk9i88ckvmmx07sdhhgdq-SDKs.drv'...
building '/nix/store/zi78wnmyka9636yrp5h3nbdzbks7j23r-Platforms.drv'...
building '/nix/store/sqi3frasnr6z6y8irv4k5c9rk5lf91qy-xcrun.drv'...
building '/nix/store/mqikjpawkqdwk2i41rc9zy7d763v27dg-xcodebuild-0.1.2-pre.drv'...
shrinking RPATHs of ELF executables and libraries in /nix/store/c3izn67xpfzgv8sn3h0xkbcsmg1z2grj-xcodebuild-0.1.2-pre
patching script interpreter paths in /nix/store/c3izn67xpfzgv8sn3h0xkbcsmg1z2grj-xcodebuild-0.1.2-pre
checking for references to /build in /nix/store/c3izn67xpfzgv8sn3h0xkbcsmg1z2grj-xcodebuild-0.1.2-pre...
/nix/store/c3izn67xpfzgv8sn3h0xkbcsmg1z2grj-xcodebuild-0.1.2-pre

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: xcbuild

Partial log (click to expand)

building '/nix/store/49rx59pw2ivgcrganzw2a135zanj4zym-SystemVersion.plist.drv'...
building '/nix/store/2f9x6vj3gv3kfi223306j95zdphvcsl3-ToolchainInfo.plist.drv'...
building '/nix/store/730sndkbnwhwzwwqv2xi3p98h9njkxvy-version.plist.drv'...
building '/nix/store/00z3932gkdzgv7xwxq4ap40j9nna8d70-SDKs.drv'...
building '/nix/store/nl30gxc339flnl5mjd6gjkz6x9z1l7z0-Toolchains.drv'...
building '/nix/store/05wrdg93kksmj3qv4gyiggnkix8vc2c3-Platforms.drv'...
building '/nix/store/pj2zn389w60z1m2w5g62az0why9xqwmi-xcrun.drv'...
building '/nix/store/bx7q2k3wzjvdpf5yz3jwsrvip2j2mdj5-xcodebuild-0.1.2-pre.drv'...
patching script interpreter paths in /nix/store/c5ys602pcc2g2jx0v7k14x410bzspz3q-xcodebuild-0.1.2-pre
/nix/store/c5ys602pcc2g2jx0v7k14x410bzspz3q-xcodebuild-0.1.2-pre

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: xcbuild

Partial log (click to expand)

building '/nix/store/xbklhymrnsla5wdkw613wcx6ha1wv2m6-version.plist.drv'...
building '/nix/store/9iw3fmpa964qj9qxjqr0dpxv93466ca1-SDKs.drv'...
building '/nix/store/7ai8hzp9pn9887awlc3x8ylg98cd0fml-Toolchains.drv'...
building '/nix/store/v6kvrqdw3hgf9iqyav0nrazwmsk6261v-Platforms.drv'...
building '/nix/store/ijd8h8nna9z9fyr5wps2pazs1qpjqsz6-xcrun.drv'...
building '/nix/store/rr05pa73ahc5fj03k4yhg83k47h2xv5a-xcodebuild-0.1.2-pre.drv'...
shrinking RPATHs of ELF executables and libraries in /nix/store/c4r3p8k2y0s6q1b6lwh96ps1747pk292-xcodebuild-0.1.2-pre
patching script interpreter paths in /nix/store/c4r3p8k2y0s6q1b6lwh96ps1747pk292-xcodebuild-0.1.2-pre
checking for references to /build in /nix/store/c4r3p8k2y0s6q1b6lwh96ps1747pk292-xcodebuild-0.1.2-pre...
/nix/store/c4r3p8k2y0s6q1b6lwh96ps1747pk292-xcodebuild-0.1.2-pre

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: xcbuild

Partial log (click to expand)

/nix/store/c3izn67xpfzgv8sn3h0xkbcsmg1z2grj-xcodebuild-0.1.2-pre

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: xcbuild

Partial log (click to expand)

/nix/store/c5ys602pcc2g2jx0v7k14x410bzspz3q-xcodebuild-0.1.2-pre

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: xcbuild

Partial log (click to expand)

building '/nix/store/7ai8hzp9pn9887awlc3x8ylg98cd0fml-Toolchains.drv'...
building '/nix/store/xbklhymrnsla5wdkw613wcx6ha1wv2m6-version.plist.drv'...
building '/nix/store/gkzfrgqd9wpm1sxy5ddx98pqrprr29la-xcode-select.drv'...
building '/nix/store/v6kvrqdw3hgf9iqyav0nrazwmsk6261v-Platforms.drv'...
building '/nix/store/ijd8h8nna9z9fyr5wps2pazs1qpjqsz6-xcrun.drv'...
building '/nix/store/rr05pa73ahc5fj03k4yhg83k47h2xv5a-xcodebuild-0.1.2-pre.drv'...
shrinking RPATHs of ELF executables and libraries in /nix/store/c4r3p8k2y0s6q1b6lwh96ps1747pk292-xcodebuild-0.1.2-pre
patching script interpreter paths in /nix/store/c4r3p8k2y0s6q1b6lwh96ps1747pk292-xcodebuild-0.1.2-pre
checking for references to /build in /nix/store/c4r3p8k2y0s6q1b6lwh96ps1747pk292-xcodebuild-0.1.2-pre...
/nix/store/c4r3p8k2y0s6q1b6lwh96ps1747pk292-xcodebuild-0.1.2-pre

@matthewbauer matthewbauer changed the base branch from master to staging August 12, 2018 03:50
@matthewbauer matthewbauer changed the base branch from staging to master August 12, 2018 03:50
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: xcbuild

Partial log (click to expand)

building '/nix/store/nb7cijadg9h8v6b4hgbl7zh29dn0hyf4-nix.xcconfig.drv'...
building '/nix/store/xbklhymrnsla5wdkw613wcx6ha1wv2m6-version.plist.drv'...
building '/nix/store/gkzfrgqd9wpm1sxy5ddx98pqrprr29la-xcode-select.drv'...
building '/nix/store/v6kvrqdw3hgf9iqyav0nrazwmsk6261v-Platforms.drv'...
building '/nix/store/ijd8h8nna9z9fyr5wps2pazs1qpjqsz6-xcrun.drv'...
building '/nix/store/rr05pa73ahc5fj03k4yhg83k47h2xv5a-xcodebuild-0.1.2-pre.drv'...
shrinking RPATHs of ELF executables and libraries in /nix/store/c4r3p8k2y0s6q1b6lwh96ps1747pk292-xcodebuild-0.1.2-pre
patching script interpreter paths in /nix/store/c4r3p8k2y0s6q1b6lwh96ps1747pk292-xcodebuild-0.1.2-pre
checking for references to /build in /nix/store/c4r3p8k2y0s6q1b6lwh96ps1747pk292-xcodebuild-0.1.2-pre...
/nix/store/c4r3p8k2y0s6q1b6lwh96ps1747pk292-xcodebuild-0.1.2-pre

@copumpkin
Copy link
Member

Very exciting, thanks again!

@vcunat
Copy link
Member

vcunat commented Aug 13, 2018

Testing on x86_64-linux:
error: while querying the derivation named 'conkeror-1.0.4':
while evaluating the attribute 'buildCommand' of the derivation 'conkeror-1.0.4' at /home/admin/nix/nixpkgs-x/pkgs/stdenv/generic/make-derivation.nix:179:11:
attribute 'execdir' missing, at /home/admin/nix/nixpkgs-x/pkgs/applications/networking/browsers/firefox/wrapper.nix:109:32

@vcunat
Copy link
Member

vcunat commented Aug 13, 2018

There's also midori and vimb, maybe more. I didn't really look into these changes, but perhaps it should just use a default if the attribute isn't defined?

@matthewbauer
Copy link
Member Author

Yeah it can default to /bin. Sorry forgot about that.

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

6 participants