diff options
author | Aleksana <me@aleksana.moe> | 2024-05-18 12:36:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-18 12:36:26 +0800 |
commit | 951f6c89244bf19969c23996c13be701d546a299 (patch) | |
tree | d3fe8e869942740760e7ce685329e000fc2e2d1e | |
parent | 6df89ee1b09de34367d1ad499a8c5832d8fcf53f (diff) | |
parent | 23d1b8e4fececf2c83875812c0920c3ecd933976 (diff) |
Merge pull request #309075 from fufexan/hyprland
hyprland: 0.39.1 -> 0.40.0; hyprwayland-scanner: init at 0.3.4
-rw-r--r-- | pkgs/applications/window-managers/hyprwm/hyprland/default.nix | 62 | ||||
-rw-r--r-- | pkgs/by-name/hy/hyprwayland-scanner/package.nix | 39 |
2 files changed, 74 insertions, 27 deletions
diff --git a/pkgs/applications/window-managers/hyprwm/hyprland/default.nix b/pkgs/applications/window-managers/hyprwm/hyprland/default.nix index 3a2920785fcd9..6a2721b8dab9a 100644 --- a/pkgs/applications/window-managers/hyprwm/hyprland/default.nix +++ b/pkgs/applications/window-managers/hyprwm/hyprland/default.nix @@ -8,27 +8,29 @@ , ninja , binutils , cairo +, epoll-shim , git , hyprcursor , hyprland-protocols , hyprlang +, hyprwayland-scanner , jq , libGL , libdrm , libexecinfo , libinput -, libxcb +, libuuid , libxkbcommon , mesa , pango , pciutils +, pkgconf , python3 , systemd , tomlplusplus , wayland , wayland-protocols , wayland-scanner -, xcbutilwm , xwayland , hwdata , seatd @@ -51,30 +53,28 @@ assert lib.assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been remov stdenv.mkDerivation (finalAttrs: { pname = "hyprland" + lib.optionalString debug "-debug"; - version = "0.39.1"; + version = "0.40.0-unstable-2024-05-12"; + src = fetchFromGitHub { owner = "hyprwm"; repo = finalAttrs.pname; fetchSubmodules = true; - rev = "v${finalAttrs.version}"; - hash = "sha256-7L5rqQRYH2iyyP5g3IdXJSlATfgnKhuYMf65E48MVKw="; + rev = "2ccd45a84475fab46c6fecd2fe226d3173104743"; + hash = "sha256-nBCQuRl4sS/G/OUS+txeelFShBEgSk2OrN6kBYMHuOg="; }; postPatch = '' # Fix hardcoded paths to /usr installation sed -i "s#/usr#$out#" src/render/OpenGL.cpp - # Generate version.h - cp src/version.h.in src/version.h - substituteInPlace src/version.h \ - --replace-fail "@HASH@" '${finalAttrs.src.rev}' \ - --replace-fail "@BRANCH@" "" \ - --replace-fail "@MESSAGE@" "" \ - --replace-fail "@DATE@" "2024-04-16" \ - --replace-fail "@TAG@" "" \ - --replace-fail "@DIRTY@" "" + # Remove extra @PREFIX@ to fix pkg-config paths + sed -i "s#@PREFIX@/##g" hyprland.pc.in ''; + # used by version.sh + DATE = "2024-05-12"; + HASH = finalAttrs.src.rev; + depsBuildBuild = [ # to find wayland-scanner when cross-compiling pkg-config @@ -82,14 +82,15 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ hwdata + hyprwayland-scanner jq makeWrapper - meson + cmake + meson # for wlroots ninja pkg-config wayland-scanner - cmake # for subproject udis86 - python3 + python3 # for udis86 ]; outputs = [ @@ -107,6 +108,7 @@ stdenv.mkDerivation (finalAttrs: { libGL libdrm libinput + libuuid libxkbcommon mesa wayland @@ -121,27 +123,33 @@ stdenv.mkDerivation (finalAttrs: { xorg.xcbutilerrors xorg.xcbutilrenderutil ] + ++ lib.optionals stdenv.hostPlatform.isBSD [ epoll-shim ] ++ lib.optionals stdenv.hostPlatform.isMusl [ libexecinfo ] - ++ lib.optionals enableXWayland [ libxcb xcbutilwm xwayland ] + ++ lib.optionals enableXWayland [ + xorg.libxcb + xorg.libXdmcp + xorg.xcbutil + xorg.xcbutilwm + xwayland + ] ++ lib.optionals withSystemd [ systemd ]; - mesonBuildType = + cmakeBuildType = if debug - then "debug" - else "release"; + then "Debug" + else "RelWithDebInfo"; - mesonAutoFeatures = "enabled"; - mesonFlags = [ - (lib.mesonEnable "xwayland" enableXWayland) - (lib.mesonEnable "legacy_renderer" legacyRenderer) - (lib.mesonEnable "systemd" withSystemd) + cmakeFlags = [ + (lib.cmakeBool "NO_XWAYLAND" (!enableXWayland)) + (lib.cmakeBool "LEGACY_RENDERER" legacyRenderer) + (lib.cmakeBool "NO_SYSTEMD" (!withSystemd)) ]; postInstall = '' ${lib.optionalString wrapRuntimeDeps '' wrapProgram $out/bin/Hyprland \ - --suffix PATH : ${lib.makeBinPath [binutils pciutils stdenv.cc]} + --suffix PATH : ${lib.makeBinPath [binutils pciutils pkgconf]} ''} ''; diff --git a/pkgs/by-name/hy/hyprwayland-scanner/package.nix b/pkgs/by-name/hy/hyprwayland-scanner/package.nix new file mode 100644 index 0000000000000..fc9fb5a820a00 --- /dev/null +++ b/pkgs/by-name/hy/hyprwayland-scanner/package.nix @@ -0,0 +1,39 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, pkg-config +, pugixml +, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "hyprwayland-scanner"; + version = "0.3.7"; + + src = fetchFromGitHub { + owner = "hyprwm"; + repo = "hyprwayland-scanner"; + rev = "v${finalAttrs.version}"; + hash = "sha256-BPc9FdIzQAmP1JnYGfr+3O30Yp1BywUvKUz57ZOZ39A="; + }; + + nativeBuildInputs = [ + cmake + pkg-config + ]; + + buildInputs = [ + pugixml + ]; + + doCheck = true; + + meta = with lib; { + homepage = "https://github.com/hyprwm/hyprwayland-scanner"; + description = "A Hyprland version of wayland-scanner in and for C++"; + license = licenses.bsd3; + maintainers = with maintainers; [ fufexan ]; + mainProgram = "hyprwayland-scanner"; + platforms = platforms.linux; + }; +}) |