From 65958f1b046b0f8374994025d508f286f9516c08 Mon Sep 17 00:00:00 2001 From: wozeparrot Date: Tue, 28 Jun 2022 15:41:52 -0400 Subject: [PATCH] hyprland: init at 0.6.0beta (#169960) --- maintainers/maintainer-list.nix | 6 ++ .../window-managers/hyprland/default.nix | 79 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 13 +++ 3 files changed, 98 insertions(+) create mode 100644 pkgs/applications/window-managers/hyprland/default.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 3dc92ba645e6..bff3019a09d2 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -13817,6 +13817,12 @@ githubId = 28888242; name = "WORLDofPEACE"; }; + wozeparrot = { + email = "wozeparrot@gmail.com"; + github = "wozeparrot"; + githubId = 25372613; + name = "Woze Parrot"; + }; wr0belj = { name = "Jakub Wróbel"; email = "wrobel.jakub@protonmail.com"; diff --git a/pkgs/applications/window-managers/hyprland/default.nix b/pkgs/applications/window-managers/hyprland/default.nix new file mode 100644 index 000000000000..50b52a01d604 --- /dev/null +++ b/pkgs/applications/window-managers/hyprland/default.nix @@ -0,0 +1,79 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, pkg-config +, libdrm +, libinput +, libxcb +, libxkbcommon +, mesa +, pango +, wayland +, wayland-protocols +, wayland-scanner +, wlroots +, xcbutilwm +}: + +stdenv.mkDerivation rec { + pname = "hyprland"; + version = "0.6.1beta"; + + # When updating Hyprland, the overridden wlroots commit must be bumped to match the commit upstream uses. + src = fetchFromGitHub { + owner = "hyprwm"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-0Msqe2ErAJvnO1zHoB2k6TkDhTYnHRGkvJrfSG12dTU="; + }; + + nativeBuildInputs = [ + cmake + pkg-config + wayland-scanner + ]; + + buildInputs = [ + libdrm + libinput + libxcb + libxkbcommon + mesa + pango + wayland + wayland-protocols + wlroots + xcbutilwm + ]; + + # build with system wlroots + postPatch = '' + sed -Ei 's/"\.\.\/wlroots\/include\/([a-zA-Z0-9./_-]+)"/<\1>/g' src/includes.hpp + ''; + + preConfigure = '' + make protocols + ''; + + postBuild = '' + pushd ../hyprctl + $CXX -std=c++20 -w ./main.cpp -o ./hyprctl + popd + ''; + + installPhase = '' + mkdir -p $out/bin + install -m755 ./Hyprland $out/bin + install -m755 ../hyprctl/hyprctl $out/bin + ''; + + meta = with lib; { + homepage = "https://github.com/vaxerski/Hyprland"; + description = "A dynamic tiling Wayland compositor that doesn't sacrifice on its looks"; + license = licenses.bsd3; + platforms = platforms.linux; + maintainers = with maintainers; [ wozeparrot ]; + mainProgram = "Hyprland"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 59fa09232af8..15eb8b69dfaf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3903,6 +3903,19 @@ with pkgs; humioctl = callPackage ../applications/logging/humioctl {}; + hyprland = callPackage ../applications/window-managers/hyprland { + wlroots = wlroots.overrideAttrs (_: { + version = "unstable-2022-06-07"; + src = fetchFromGitLab { + domain = "gitlab.freedesktop.org"; + owner = "wlroots"; + repo = "wlroots"; + rev = "b89ed9015c3fbe8d339e9d65cf70fdca6e5645bc"; + sha256 = "sha256-8y3u8CoigjoZOVbA2wCWBHlDNEakv0AVxU46/cOC00s="; + }; + }); + }; + hyx = callPackage ../tools/text/hyx { }; icdiff = callPackage ../tools/text/icdiff {};