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

hyprland: 0.38.1 -> 0.39.1 #304725

Merged
merged 1 commit into from
Apr 25, 2024
Merged

hyprland: 0.38.1 -> 0.39.1 #304725

merged 1 commit into from
Apr 25, 2024

Conversation

fufexan
Copy link
Contributor

@fufexan fufexan commented Apr 17, 2024

Description of changes

CHANGELOG 0.39.0
CHANGELOG 0.39.1

Note: wlroots is now a fork of the upstream, and is built statically.

Closes #304143.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@wineee
Copy link
Member

wineee commented Apr 17, 2024

wlroots-hyprland is built statically and only used in hyprland, why not just build from submodule?

@fufexan
Copy link
Contributor Author

fufexan commented Apr 17, 2024

We can do that, sure.

@fufexan
Copy link
Contributor Author

fufexan commented Apr 20, 2024

@wineee I've tried making it build the subprojects directly but the derivation fails at the linking step. Not sure what might be wrong, maybe someone has an idea.

EDIT: there seems to be an issue with the Nix build, as running meson setup build && ninja -C build in a devshell works fine.

diff --git a/pkgs/applications/window-managers/hyprwm/hyprland/default.nix b/pkgs/applications/window-managers/hyprwm/hyprland/default.nix
index 4d8747b8f66b..cc0379ce1684 100644
--- a/pkgs/applications/window-managers/hyprwm/hyprland/default.nix
+++ b/pkgs/applications/window-managers/hyprwm/hyprland/default.nix
@@ -3,6 +3,7 @@
 , fetchFromGitHub
 , pkg-config
 , makeWrapper
+, cmake
 , meson
 , ninja
 , binutils
@@ -23,11 +24,12 @@
 , pciutils
 , systemd
 , tomlplusplus
-, udis86-hyprland
+, udis86
+, python3
 , wayland
 , wayland-protocols
 , wayland-scanner
-, wlroots-hyprland
+, wlroots
 , xcbutilwm
 , xwayland
 , debug ? false
@@ -45,7 +47,7 @@ assert lib.assertMsg (!enableNvidiaPatches) "The option `enableNvidiaPatches` ha
 assert lib.assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been removed. Please refer https://wiki.hyprland.org/Configuring/XWayland";
 
 let
-  wlr = wlroots-hyprland.override { inherit enableXWayland; };
+  # wlr = wlroots-hyprland.override { inherit enableXWayland; };
 in
 stdenv.mkDerivation (finalAttrs: {
   pname = "hyprland" + lib.optionalString debug "-debug";
@@ -54,12 +56,13 @@ stdenv.mkDerivation (finalAttrs: {
     owner = "hyprwm";
     repo = finalAttrs.pname;
     rev = "v${finalAttrs.version}";
-    hash = "sha256-piBUBQsQ8R20/lX9GMJjwdntal6yfJZMVCIi21XCZ8Y=";
+    hash = "sha256-7L5rqQRYH2iyyP5g3IdXJSlATfgnKhuYMf65E48MVKw=";
+    fetchSubmodules = true;
   };
 
   patches = [
     # make meson use the provided dependencies instead of the git submodules
-    "${finalAttrs.src}/nix/patches/meson-build.patch"
+    # "${finalAttrs.src}/nix/patches/meson-build.patch"
   ];
 
   postPatch = ''
@@ -82,6 +85,8 @@ stdenv.mkDerivation (finalAttrs: {
     makeWrapper
     meson
     ninja
+    cmake
+    python3
     pkg-config
     wayland-scanner
   ];
@@ -93,7 +98,7 @@ stdenv.mkDerivation (finalAttrs: {
   ];
 
   buildInputs =
-    wlr.buildInputs ++ [
+    wlroots.buildInputs ++ udis86.buildInputs ++ [
       cairo
       git
       hyprcursor
@@ -104,13 +109,11 @@ stdenv.mkDerivation (finalAttrs: {
       libinput
       libxkbcommon
       mesa
-      udis86-hyprland
       wayland
       wayland-protocols
       pango
       pciutils
       tomlplusplus
-      wlr
     ]
     ++ lib.optionals stdenv.hostPlatform.isMusl [ libexecinfo ]
     ++ lib.optionals enableXWayland [ libxcb xcbutilwm xwayland ]
@@ -130,7 +133,6 @@ stdenv.mkDerivation (finalAttrs: {
   ];
 
   postInstall = ''
-    ln -s ${wlr}/include/wlr $dev/include/hyprland/wlroots
     ${lib.optionalString wrapRuntimeDeps ''
       wrapProgram $out/bin/Hyprland \
         --suffix PATH : ${lib.makeBinPath [binutils pciutils stdenv.cc]}
@@ -145,6 +147,6 @@ stdenv.mkDerivation (finalAttrs: {
     license = licenses.bsd3;
     maintainers = with maintainers; [ wozeparrot fufexan ];
     mainProgram = "Hyprland";
-    platforms = wlr.meta.platforms;
+    platforms = wlroots.meta.platforms;
   };
 })

@donovanglover
Copy link
Member

Result of nixpkgs-review pr 304725 run on x86_64-linux 1

13 packages failed to build:
  • grimblast
  • hdrop
  • hyprland
  • hyprland.dev
  • hyprland.man
  • hyprlandPlugins.hy3
  • hyprshade
  • hyprshade.dist
  • hyprshot
  • nwg-panel
  • nwg-panel.dist
  • waybar
  • xdg-desktop-portal-hyprland

@leiserfg
Copy link
Contributor

Sorry for the noise but, what is blocking this?

@fufexan
Copy link
Contributor Author

fufexan commented Apr 25, 2024

@leiserfg @wineee suggested we build the submodules directly instead of patching the build and using overridden derivations. But that doesn't work, as can be seen in my previous comment.

I plan on using CMake instead of Meson for the Nix build, so we can merge this PR as is currently, and figure out the details later.

@wineee wineee merged commit 10b682b into NixOS:master Apr 25, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants