-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
phoc: 0.8.0 -> 0.9.0, patch for wlroots 0.14 #143785
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,36 +15,53 @@ | |
| , libdrm | ||
| , libxkbcommon | ||
| , wlroots | ||
| , runCommand | ||
| , patchutils | ||
| , fetchurl | ||
| }: | ||
|
|
||
| let | ||
| phocWlroots = wlroots.overrideAttrs (old: { | ||
| patches = (old.patches or []) ++ [ | ||
| # Temporary fix. Upstream report: https://source.puri.sm/Librem5/phosh/-/issues/422 | ||
| (fetchpatch { | ||
| name = "0001-Revert-layer-shell-error-on-0-dimension-without-anch.patch"; | ||
| url = "https://gitlab.alpinelinux.org/alpine/aports/-/raw/78fde4aaf1a74eb13a3f083cb6dfb29f578c3265/community/wlroots/0001-Revert-layer-shell-error-on-0-dimension-without-anch.patch"; | ||
| sha256 = "1zjn7mwdj21z0jsc2mz90cnrzk97yqkiq58qqgpjav4h4dgpfb38"; | ||
| }) | ||
| # To fix missing header `EGL/eglmesaext.h` dropped upstream | ||
| (fetchpatch { | ||
| name = "0002-stop-including-eglmesaext-h.patch"; | ||
| url = "https://github.com/swaywm/wlroots/commit/e18599b05e0f0cbeba11adbd489e801285470eab.patch"; | ||
| sha256 = "17ax4dyk0584yhs3lq8ija5bkainjf7psx9c9r50cr4jm9c0i37l"; | ||
| }) | ||
| ]; | ||
| }); | ||
| # Patchset for upstream MR that gets wlroots to 0.15 | ||
| # https://gitlab.gnome.org/World/Phosh/phoc/-/merge_requests/284 | ||
| # https://gitlab.gnome.org/World/Phosh/phoc/-/merge_requests/284/diffs?diff_id=255756 | ||
| # Not using fetchpatch on purpose here, because we _WANT_ to split it into commits first. | ||
| upstream_wlroots_0_15_patch = fetchurl { | ||
| url = "https://gitlab.gnome.org/World/Phosh/phoc/-/merge_requests/284/diffs.patch?diff_id=255756"; | ||
| sha256 = "19pjdrgnr2qpfqql45v8i0sggsvxbrjf1p527m53g0f56cpk4y9z"; | ||
| name = "284.patch"; | ||
| }; | ||
| # Let's horribly maim it using patchitils, grep, and a bit of elbow grease: | ||
| wlroots_0_14_patch = runCommand "wlroots_0_14.patch" { | ||
| nativeBuildInputs = [ patchutils ]; | ||
| } '' | ||
| # There might be a nicer way to include only the first 7 commits in this | ||
| # range, but this works. | ||
| csplit --elide-empty-files ${upstream_wlroots_0_15_patch} '/^-- $/' '{*}' | ||
| rm xx07 | ||
| cat xx* > first_7.patch | ||
|
Comment on lines
+37
to
+41
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It may make more sense to include those patches one by one instead of doing this. We can have a helper function like this to make it cleaner. For the patch that updates the submodule pin, we can probably move the edited patch in-tree since it's tiny anyways. |
||
|
|
||
| # We want to use our own wlroots, so the vendored wlroots doesn't exist. | ||
| # Patch complains we claim it does. | ||
| filterdiff \ | ||
| --exclude 'a/subprojects/wlroots' first_7.patch \ | ||
| > without_vendoring.patch | ||
|
|
||
| # Allow for other wlroots versions. | ||
| sed -i 's@== 0.14.0@== ${wlroots.version}@' without_vendoring.patch | ||
|
|
||
| cat without_vendoring.patch > $out | ||
| ''; | ||
| in stdenv.mkDerivation rec { | ||
| pname = "phoc"; | ||
| version = "0.8.0"; | ||
| version = "0.9.0"; | ||
|
|
||
| src = fetchFromGitLab { | ||
| domain = "gitlab.gnome.org"; | ||
| group = "World"; | ||
| owner = "Phosh"; | ||
| repo = pname; | ||
| rev = "v${version}"; | ||
| sha256 = "sha256-QAnJlpFjWJvwxGyenmN4IaI9VFn2jwdXpa8VqAmH7Xw="; | ||
| sha256 = "18nwjbyjxq11ppfdky3bnfh9pr23fjl2543jwva0iz1n6c8mkpd9"; | ||
| }; | ||
|
|
||
| nativeBuildInputs = [ | ||
|
|
@@ -65,11 +82,15 @@ in stdenv.mkDerivation rec { | |
| # For keybindings settings schemas | ||
| gnome.mutter | ||
| wayland | ||
| phocWlroots | ||
| wlroots | ||
| ]; | ||
|
|
||
| mesonFlags = ["-Dembed-wlroots=disabled"]; | ||
|
|
||
| patches = [ | ||
| wlroots_0_14_patch | ||
| ]; | ||
|
|
||
| postPatch = '' | ||
| chmod +x build-aux/post_install.py | ||
| patchShebangs build-aux/post_install.py | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This patch is still needed, along with another revert (haven't tested). See the commit history of the forked version they are pinning onto.