diff options
Diffstat (limited to 'pkgs/by-name/hy/hyprland/package.nix')
-rw-r--r-- | pkgs/by-name/hy/hyprland/package.nix | 229 |
1 files changed, 117 insertions, 112 deletions
diff --git a/pkgs/by-name/hy/hyprland/package.nix b/pkgs/by-name/hy/hyprland/package.nix index 97b54ffdbf150..e098f80cce7a0 100644 --- a/pkgs/by-name/hy/hyprland/package.nix +++ b/pkgs/by-name/hy/hyprland/package.nix @@ -1,77 +1,78 @@ -{ lib -, stdenv -, fetchFromGitHub -, pkg-config -, makeWrapper -, meson -, cmake -, ninja -, binutils -, cairo -, epoll-shim -, expat -, fribidi -, git -, hyprcursor -, hyprland-protocols -, hyprlang -, hyprutils -, hyprwayland-scanner -, jq -, libGL -, libdrm -, libdatrie -, libexecinfo -, libinput -, libselinux -, libsepol -, libthai -, libuuid -, libxkbcommon -, mesa -, pango -, pciutils -, pcre2 -, pkgconf -, python3 -, systemd -, tomlplusplus -, wayland -, wayland-protocols -, wayland-scanner -, xwayland -, hwdata -, seatd -, libdisplay-info -, libliftoff -, xorg -, debug ? false -, enableXWayland ? true -, legacyRenderer ? false -, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd -, wrapRuntimeDeps ? true +{ + lib, + stdenv, + fetchFromGitHub, + pkg-config, + makeWrapper, + cmake, + ninja, + aquamarine, + binutils, + cairo, + epoll-shim, + expat, + fribidi, + git, + hwdata, + hyprcursor, + hyprlang, + hyprutils, + hyprwayland-scanner, + jq, + libGL, + libdatrie, + libdisplay-info, + libdrm, + libexecinfo, + libinput, + libliftoff, + libselinux, + libsepol, + libthai, + libuuid, + libxkbcommon, + mesa, + pango, + pciutils, + pcre2, + pkgconf, + python3, + seatd, + systemd, + tomlplusplus, + wayland, + wayland-protocols, + wayland-scanner, + xorg, + xwayland, + debug ? false, + enableXWayland ? true, + legacyRenderer ? false, + withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, + wrapRuntimeDeps ? true, # deprecated flags -, nvidiaPatches ? false -, hidpiXWayland ? false -, enableNvidiaPatches ? false + nvidiaPatches ? false, + hidpiXWayland ? false, + enableNvidiaPatches ? false, }: let info = builtins.fromJSON (builtins.readFile ./info.json); in assert lib.assertMsg (!nvidiaPatches) "The option `nvidiaPatches` has been removed."; assert lib.assertMsg (!enableNvidiaPatches) "The option `enableNvidiaPatches` has been removed."; -assert lib.assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been removed. Please refer https://wiki.hyprland.org/Configuring/XWayland"; +assert lib.assertMsg (!hidpiXWayland) + "The option `hidpiXWayland` has been removed. Please refer https://wiki.hyprland.org/Configuring/XWayland"; stdenv.mkDerivation (finalAttrs: { pname = "hyprland" + lib.optionalString debug "-debug"; - version = "0.41.2"; + version = "0.42.0"; src = fetchFromGitHub { owner = "hyprwm"; - repo = finalAttrs.pname; + repo = "hyprland"; fetchSubmodules = true; rev = "refs/tags/v${finalAttrs.version}"; - hash = "sha256-JmfnYz+9a4TjNl3mAus1VpoWtTI9d1xkW9MHbkcV0Po="; + hash = "sha256-deu8zvgseDg2gQEnZiCda4TrbA6pleE9iItoZlsoMtE="; }; postPatch = '' @@ -97,16 +98,14 @@ stdenv.mkDerivation (finalAttrs: { ]; nativeBuildInputs = [ - hwdata hyprwayland-scanner jq makeWrapper cmake - meson # for wlroots ninja pkg-config - wayland-scanner python3 # for udis86 + wayland-scanner ]; outputs = [ @@ -115,54 +114,54 @@ stdenv.mkDerivation (finalAttrs: { "dev" ]; - buildInputs = [ - cairo - expat - fribidi - git - hyprcursor.dev - hyprland-protocols - hyprlang - hyprutils - libGL - libdatrie - libdrm - libinput - libselinux - libsepol - libthai - libuuid - libxkbcommon - mesa - wayland - wayland-protocols - pango - pciutils - pcre2 - tomlplusplus - # for subproject wlroots-hyprland - seatd - libliftoff - libdisplay-info - xorg.xcbutilerrors - xorg.xcbutilrenderutil - ] - ++ lib.optionals stdenv.hostPlatform.isBSD [ epoll-shim ] - ++ lib.optionals stdenv.hostPlatform.isMusl [ libexecinfo ] - ++ lib.optionals enableXWayland [ - xorg.libxcb - xorg.libXdmcp - xorg.xcbutil - xorg.xcbutilwm - xwayland - ] - ++ lib.optionals withSystemd [ systemd ]; - - cmakeBuildType = - if debug - then "Debug" - else "RelWithDebInfo"; - + buildInputs = + [ + aquamarine + cairo + expat + fribidi + git + hwdata + hyprcursor.dev + hyprlang + hyprutils + libGL + libdatrie + libdisplay-info + libdrm + libinput + libliftoff + libselinux + libsepol + libthai + libuuid + libxkbcommon + mesa + pango + pciutils + pcre2 + seatd + tomlplusplus + wayland + wayland-protocols + ] + ++ lib.optionals stdenv.hostPlatform.isBSD [ epoll-shim ] + ++ lib.optionals stdenv.hostPlatform.isMusl [ libexecinfo ] + ++ lib.optionals enableXWayland [ + xorg.libxcb + xorg.libXcursor + xorg.libXdmcp + xorg.xcbutil + xorg.xcbutilerrors + xorg.xcbutilrenderutil + xorg.xcbutilwm + xwayland + ] + ++ lib.optionals withSystemd [ systemd ]; + + cmakeBuildType = if debug then "Debug" else "RelWithDebInfo"; + + dontStrip = debug; cmakeFlags = [ (lib.cmakeBool "NO_XWAYLAND" (!enableXWayland)) @@ -173,7 +172,13 @@ stdenv.mkDerivation (finalAttrs: { postInstall = '' ${lib.optionalString wrapRuntimeDeps '' wrapProgram $out/bin/Hyprland \ - --suffix PATH : ${lib.makeBinPath [binutils pciutils pkgconf]} + --suffix PATH : ${ + lib.makeBinPath [ + binutils + pciutils + pkgconf + ] + } ''} ''; @@ -191,6 +196,6 @@ stdenv.mkDerivation (finalAttrs: { wozeparrot ]; mainProgram = "Hyprland"; - platforms = lib.platforms.linux; + platforms = lib.platforms.linux ++ lib.platforms.freebsd; }; }) |