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
libcef: init at 51.0.2704.47-1414 #15648
Conversation
By analyzing the blame information on this pull request, we identified @aszlig, @edolstra and @Eternity-Yarr to be potential reviewers |
Very cool, will review this tomorrow! Thanks in advance already :-) |
I've updated this -- moved |
# Run "git rev-list --count HEAD" to get this number | ||
cefVersion = "1414"; | ||
# from CHROMIUM_BUILD_COMPATIBILITY.txt | ||
upstreamVersion = "51.0.2704.47"; |
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.
Does this mean that an update of Chromium will potentially break libcef
as well?
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.
Yeah, and sadly there's no way around -- each libcef revision is bound to a specific chromium version.
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.
Okay, so it probably might make sense to add it to the updater. However I'm not sure on how to namespace it properly, because if the chromium updater also updates libcef
it might get confusing, so it's probably better to move the updater out of the chromium
directory, as it's not only used for Chromium, but also for Chrome and now libcef
, so we should pick an appropriate name for it.
However, we can still decide on that at some later point.
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.
I'm going to merge #15762 very soon, so I think this will break libcef
. Can you please test building libcef
after the merge is done? I'll Cc you in the merge commit so that you'll get notified.
Overall it may prove fairly useless to us -- for example, it's too new for Unity3D (which I've packaged per friend's request -- PR is coming) and causes segfaults, and a version which would be good for it doesn't support userns yet. If there're another use cases for it, good. |
''; | ||
|
||
dontAddPrefix = true; | ||
configureScript = "python build/gyp_chromium"; |
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.
Hm, I'm not sure whether this is a good idea, because the configurePhase
from stdenv
does a lot of other things than just adding --prefix
(for example fixing libtool
or add other flags if desired). I think it's better to not only use $gypFlags
as a builder environment variable but also add something like $gypScript
and $gypBasePath
(or similar name) which can be overridden in the libcef
attributes.
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.
Well, we can just make our own configurePhase
:
runHook preConfigure
python build/gyp_chromium -f ninja $gypScript $gypFlags
runHook postConfigure
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.
Yep, or just call it $gypFlags
because even -f ninja
and -I
are gyp flags already.
Other than that, the implementation looks good to me and I'm going to test/merge it by tomorrow or (more likely) on Monday. If you're impatient, you can also merge it by yourself. |
New version -- I've now built |
Hm, in case of Unity3D, we could make sure that we build a version which matches with their ancient version. Is there a way to automatically retrieve the |
About Unity: Yes we can, but there's a problem -- I cannot understand how can we actually find "commit number" which serves as libcef's version. From the code they calculate this with But this won't help us because Unity requires such an old libcef that it doesn't support user namespaces at all (they were included in chromium 43 IIUC (see MovedFrom), and Unity bundles 37). |
Nice! So, the only problem is "how to find out version which Unity actually uses"... or rather "how to find out version which we built", because those |
I've updated |
👍 This looks good. The merge conflicts should be trivial. I think we should be able to use this to build "Brackets" which is currently just using a binary blob. Similarly, "libchromiumcontent" should be buildable using this same method and enable us to build Electron from source. |
Any update on this? |
This seems to work but I haven't tried to actually use it for anything which is a main problem. I lost motivation to try to build something that uses |
I've refreshed this PR and split most unrelated changes to #22568. |
@abbradar I am trying to package the new minecraft launcher (work in progress branch: https://github.com/ryantm/nixpkgs/tree/minecraft ) and
|
👍 for merging (after updating chromiumVersion of course) |
I tried running cef-update.sh but the version of Chromium libcef supports is slightly different from what we have in nixpkgs, so it fails. |
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.
Doesn't merge currently. We also need to figure out the updater.
Stalled, but feel free to come up with a new PR |
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)I've packaged it some time ago but haven't found any use of it in the end. I'm not sure if it works correctly but I see no reason it won't. This can be useful for #10452 for example. Credits to @aszlig -- this was based on his work.