diff options
Diffstat (limited to 'pkgs/applications/window-managers/hyprwm')
10 files changed, 156 insertions, 276 deletions
diff --git a/pkgs/applications/window-managers/hyprwm/hypr/default.nix b/pkgs/applications/window-managers/hyprwm/hypr/default.nix index 82ed70b0d6a04..3952256b8d410 100644 --- a/pkgs/applications/window-managers/hyprwm/hypr/default.nix +++ b/pkgs/applications/window-managers/hyprwm/hypr/default.nix @@ -72,7 +72,7 @@ stdenv.mkDerivation (finalAttrs: { meta = with lib; { inherit (finalAttrs.src.meta) homepage; - description = "A tiling X11 window manager written in modern C++"; + description = "Tiling X11 window manager written in modern C++"; license = licenses.bsd3; maintainers = with maintainers; [ AndersonTorres ]; inherit (libX11.meta) platforms; diff --git a/pkgs/applications/window-managers/hyprwm/hyprland-plugins/default.nix b/pkgs/applications/window-managers/hyprwm/hyprland-plugins/default.nix new file mode 100644 index 0000000000000..f994b19175209 --- /dev/null +++ b/pkgs/applications/window-managers/hyprwm/hyprland-plugins/default.nix @@ -0,0 +1,35 @@ +{ + lib, + callPackage, + pkg-config, + stdenv, + hyprland, +}: +let + mkHyprlandPlugin = + hyprland: + args@{ pluginName, ... }: + stdenv.mkDerivation ( + args + // { + pname = "${pluginName}"; + nativeBuildInputs = [ pkg-config ] ++ args.nativeBuildInputs or [ ]; + buildInputs = [ hyprland ] ++ hyprland.buildInputs ++ (args.buildInputs or [ ]); + meta = args.meta // { + description = args.meta.description or ""; + longDescription = + (args.meta.longDescription or "") + + "\n\nPlugins can be installed via a plugin entry in the Hyprland NixOS or Home Manager options."; + }; + } + ); + + plugins = lib.mergeAttrsList [ + { hy3 = import ./hy3.nix; } + (import ./hyprland-plugins.nix) + ]; +in +(lib.mapAttrs (name: plugin: callPackage plugin { inherit mkHyprlandPlugin; }) plugins) +// { + inherit mkHyprlandPlugin; +} diff --git a/pkgs/applications/window-managers/hyprwm/hyprland-plugins/hy3.nix b/pkgs/applications/window-managers/hyprwm/hyprland-plugins/hy3.nix new file mode 100644 index 0000000000000..bd4422cb33fba --- /dev/null +++ b/pkgs/applications/window-managers/hyprwm/hyprland-plugins/hy3.nix @@ -0,0 +1,33 @@ +{ + lib, + cmake, + fetchFromGitHub, + hyprland, + mkHyprlandPlugin, +}: +mkHyprlandPlugin hyprland rec { + pluginName = "hy3"; + version = "0.41.2"; + + src = fetchFromGitHub { + owner = "outfoxxed"; + repo = "hy3"; + rev = "refs/tags/hl${version}"; + hash = "sha256-aZuNKBwTwj8EXkDBMWNdRKbHPx647wJLWm55h6jOKbo="; + }; + + nativeBuildInputs = [ cmake ]; + + dontStrip = true; + + meta = { + homepage = "https://github.com/outfoxxed/hy3"; + description = "Hyprland plugin for an i3 / sway like manual tiling layout"; + license = lib.licenses.gpl3; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ + aacebedo + johnrtitor + ]; + }; +} diff --git a/pkgs/applications/window-managers/hyprwm/hyprland-plugins/hyprland-plugins.nix b/pkgs/applications/window-managers/hyprwm/hyprland-plugins/hyprland-plugins.nix new file mode 100644 index 0000000000000..b3bd59f7b5255 --- /dev/null +++ b/pkgs/applications/window-managers/hyprwm/hyprland-plugins/hyprland-plugins.nix @@ -0,0 +1,54 @@ +let + # shared src for upstream hyprland-plugins repo + # function generating derivations for all plugins in hyprland-plugins + hyprland-plugins = + builtins.mapAttrs + ( + name: description: + ( + { + lib, + cmake, + fetchFromGitHub, + hyprland, + mkHyprlandPlugin, + }: + let + version = "0.41.2"; + + hyprland-plugins-src = fetchFromGitHub { + owner = "hyprwm"; + repo = "hyprland-plugins"; + rev = "refs/tags/v${version}"; + hash = "sha256-TnlAcO5K2gkab0mpKurP5Co6eWRycP/KbFqWNS2rsMA="; + }; + in + mkHyprlandPlugin hyprland { + pluginName = name; + inherit version; + + src = "${hyprland-plugins-src}/${name}"; + nativeBuildInputs = [ cmake ]; + meta = { + homepage = "https://github.com/hyprwm/hyprland-plugins"; + description = "Hyprland ${description} plugin"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ + fufexan + johnrtitor + ]; + platforms = lib.platforms.linux; + }; + } + ) + ) + { + borders-plus-plus = "multiple borders"; + csgo-vulkan-fix = "CS:GO/CS2 Vulkan fix"; + hyprbars = "window title"; + hyprexpo = "workspaces overview"; + hyprtrails = "smooth trails behind moving windows"; + hyprwinwrap = "xwinwrap-like"; + }; +in +hyprland-plugins diff --git a/pkgs/applications/window-managers/hyprwm/hyprland-protocols/default.nix b/pkgs/applications/window-managers/hyprwm/hyprland-protocols/default.nix index 050c1c73d63c4..8815205b0e9d1 100644 --- a/pkgs/applications/window-managers/hyprwm/hyprland-protocols/default.nix +++ b/pkgs/applications/window-managers/hyprwm/hyprland-protocols/default.nix @@ -6,13 +6,13 @@ }: stdenv.mkDerivation (finalAttrs: { pname = "hyprland-protocols"; - version = "0.2"; + version = "0.3.0"; src = fetchFromGitHub { owner = "hyprwm"; repo = finalAttrs.pname; rev = "v${finalAttrs.version}"; - hash = "sha256-QPzwwlGKX95tl6ZEshboZbEwwAXww6lNLdVYd6T9Mrc="; + hash = "sha256-HUklK5u86w2Yh9dOkk4FdsL8eehcOZ95jPhLixGDRQY="; }; nativeBuildInputs = [ diff --git a/pkgs/applications/window-managers/hyprwm/hyprland/default.nix b/pkgs/applications/window-managers/hyprwm/hyprland/default.nix deleted file mode 100644 index decfd5d3cd03f..0000000000000 --- a/pkgs/applications/window-managers/hyprwm/hyprland/default.nix +++ /dev/null @@ -1,163 +0,0 @@ -{ lib -, stdenv -, fetchFromGitHub -, pkg-config -, makeWrapper -, meson -, cmake -, ninja -, binutils -, cairo -, epoll-shim -, git -, hyprcursor -, hyprland-protocols -, hyprlang -, hyprwayland-scanner -, jq -, libGL -, libdrm -, libexecinfo -, libinput -, libuuid -, libxkbcommon -, mesa -, pango -, pciutils -, 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 - # deprecated flags -, nvidiaPatches ? false -, hidpiXWayland ? false -, enableNvidiaPatches ? false -}: -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"; - -stdenv.mkDerivation (finalAttrs: { - pname = "hyprland" + lib.optionalString debug "-debug"; - version = "0.40.0-unstable-2024-05-05"; - - src = fetchFromGitHub { - owner = "hyprwm"; - repo = finalAttrs.pname; - fetchSubmodules = true; - rev = "f15513309b24790099d42974274eb23f66f7c985"; - hash = "sha256-zKOfgXPTlRqCR+EME4qjN9rgAnC3viI5KWx10dhKszw="; - }; - - postPatch = '' - # Fix hardcoded paths to /usr installation - sed -i "s#/usr#$out#" src/render/OpenGL.cpp - ''; - - # used by version.sh - DATE = "2024-05-05"; - HASH = finalAttrs.src.rev; - - depsBuildBuild = [ - # to find wayland-scanner when cross-compiling - pkg-config - ]; - - nativeBuildInputs = [ - hwdata - hyprwayland-scanner - jq - makeWrapper - cmake - meson # for wlroots - ninja - pkg-config - wayland-scanner - python3 # for udis86 - ]; - - outputs = [ - "out" - "man" - "dev" - ]; - - buildInputs = [ - cairo - git - hyprcursor - hyprland-protocols - hyprlang - libGL - libdrm - libinput - libuuid - libxkbcommon - mesa - wayland - wayland-protocols - pango - pciutils - 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"; - - - 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 pkgconf]} - ''} - ''; - - passthru.providedSessions = [ "hyprland" ]; - - meta = with lib; { - homepage = "https://github.com/hyprwm/Hyprland"; - description = "A dynamic tiling Wayland compositor that doesn't sacrifice on its looks"; - license = licenses.bsd3; - maintainers = with maintainers; [ wozeparrot fufexan ]; - mainProgram = "Hyprland"; - platforms = lib.platforms.linux; - }; -}) diff --git a/pkgs/applications/window-managers/hyprwm/hyprland/plugins.nix b/pkgs/applications/window-managers/hyprwm/hyprland/plugins.nix deleted file mode 100644 index 9f677165c0c97..0000000000000 --- a/pkgs/applications/window-managers/hyprwm/hyprland/plugins.nix +++ /dev/null @@ -1,63 +0,0 @@ -{ lib -, callPackage -, pkg-config -, stdenv -, hyprland -, fetchpatch -}: -let - mkHyprlandPlugin = hyprland: - args@{ pluginName, ... }: - stdenv.mkDerivation (args // { - pname = "${pluginName}"; - nativeBuildInputs = [ pkg-config ] ++ args.nativeBuildInputs or [ ]; - buildInputs = [ hyprland ] - ++ hyprland.buildInputs - ++ (args.buildInputs or [ ]); - meta = args.meta // { - description = args.meta.description or ""; - longDescription = (args.meta.longDescription or "") + - "\n\nPlugins can be installed via a plugin entry in the Hyprland NixOS or Home Manager options."; - }; - }); - - plugins = { - hy3 = { fetchFromGitHub, cmake, hyprland }: - mkHyprlandPlugin hyprland { - pluginName = "hy3"; - version = "0.40.0"; - - src = fetchFromGitHub { - owner = "outfoxxed"; - repo = "hy3"; - rev = "hl0.40.0"; - hash = "sha256-Y9bIML3C5xyKKv+Yel4LUfSkScwGunOVZkg+Z1dPwHI="; - }; - - patches = [ - (fetchpatch { - url = "https://github.com/outfoxxed/hy3/commit/33c8d761ff1c1d2264f7549a7bcfc010929d153c.patch"; - hash = "sha256-GcLQ38IVGB6VFMviKqWAM9ayjC2lpWekx3kqrnwsLhk="; - }) - - (fetchpatch { - url = "https://github.com/outfoxxed/hy3/commit/400930e0391a0e13ebbc6a3b9fe162e00aaad89a.patch"; - hash = "sha256-DVrZSkXE4uKrAceGpUZklqrVRzV1CpNRgjpq0uOz0jk="; - }) - ]; - - nativeBuildInputs = [ cmake ]; - - dontStrip = true; - - meta = with lib; { - homepage = "https://github.com/outfoxxed/hy3"; - description = "Hyprland plugin for an i3 / sway like manual tiling layout"; - license = licenses.gpl3; - platforms = platforms.linux; - maintainers = [ maintainers.aacebedo ]; - }; - }; - }; -in -(lib.mapAttrs (name: plugin: callPackage plugin { }) plugins) // { inherit mkHyprlandPlugin; } diff --git a/pkgs/applications/window-managers/hyprwm/hyprpaper/default.nix b/pkgs/applications/window-managers/hyprwm/hyprpaper/default.nix index d5df6da46d658..9da143be08bf1 100644 --- a/pkgs/applications/window-managers/hyprwm/hyprpaper/default.nix +++ b/pkgs/applications/window-managers/hyprwm/hyprpaper/default.nix @@ -2,14 +2,24 @@ , stdenv , fetchFromGitHub , cmake +, cairo +, expat , file +, fribidi , hyprlang +, libdatrie , libGL , libjpeg +, libselinux +, libsepol +, libthai , libwebp -, mesa +, libXdmcp , pango +, pcre +, pcre2 , pkg-config +, util-linux , wayland , wayland-protocols , wayland-scanner @@ -33,13 +43,23 @@ stdenv.mkDerivation (finalAttrs: { ]; buildInputs = [ + cairo + expat file + fribidi hyprlang + libdatrie libGL libjpeg + libselinux + libsepol + libthai libwebp - mesa + libXdmcp pango + pcre + pcre2 + util-linux wayland wayland-protocols ]; @@ -49,21 +69,9 @@ stdenv.mkDerivation (finalAttrs: { --replace GIT_COMMIT_HASH '"${finalAttrs.src.rev}"' ''; - preConfigure = '' - make protocols - ''; - - installPhase = '' - runHook preInstall - - install -Dm755 ./hyprpaper -t $out/bin - - runHook postInstall - ''; - meta = with lib; { inherit (finalAttrs.src.meta) homepage; - description = "A blazing fast wayland wallpaper utility"; + description = "Blazing fast wayland wallpaper utility"; license = licenses.bsd3; maintainers = with maintainers; [ wozeparrot fufexan ]; inherit (wayland.meta) platforms; diff --git a/pkgs/applications/window-managers/hyprwm/hyprpicker/default.nix b/pkgs/applications/window-managers/hyprwm/hyprpicker/default.nix index a4a747fba3f99..4089d82a3b977 100644 --- a/pkgs/applications/window-managers/hyprwm/hyprpicker/default.nix +++ b/pkgs/applications/window-managers/hyprwm/hyprpicker/default.nix @@ -19,19 +19,18 @@ , wayland , wayland-protocols , wayland-scanner -, wlroots , libXdmcp , debug ? false }: stdenv.mkDerivation (finalAttrs: { pname = "hyprpicker" + lib.optionalString debug "-debug"; - version = "0.2.0"; + version = "0.3.0"; src = fetchFromGitHub { owner = "hyprwm"; repo = finalAttrs.pname; rev = "v${finalAttrs.version}"; - hash = "sha256-bys8S7wuY9FJRLD5WriktWED5Hi7nCKSiNbs1Rvfk4s="; + hash = "sha256-BYQF1zM6bJ44ag9FJ0aTSkhOTY9U7uRdp3SmRCs5fJM="; }; cmakeBuildType = if debug then "Debug" else "Release"; @@ -57,40 +56,17 @@ stdenv.mkDerivation (finalAttrs: { wayland wayland-protocols wayland-scanner - wlroots libXdmcp util-linux ]; - configurePhase = '' - runHook preConfigure - - make protocols - - runHook postConfigure - ''; - - buildPhase = '' - runHook preBuild - - make release - - runHook postBuild - ''; - - installPhase = '' - runHook preInstall - - mkdir -p $out/{bin,share/licenses} - - install -Dm755 build/hyprpicker -t $out/bin - install -Dm644 LICENSE -t $out/share/licenses/hyprpicker - - runHook postInstall + postInstall = '' + mkdir -p $out/share/licenses + install -Dm644 $src/LICENSE -t $out/share/licenses/hyprpicker ''; meta = with lib; { - description = "A wlroots-compatible Wayland color picker that does not suck"; + description = "Wlroots-compatible Wayland color picker that does not suck"; homepage = "https://github.com/hyprwm/hyprpicker"; license = licenses.bsd3; maintainers = with maintainers; [ fufexan ]; diff --git a/pkgs/applications/window-managers/hyprwm/xdg-desktop-portal-hyprland/default.nix b/pkgs/applications/window-managers/hyprwm/xdg-desktop-portal-hyprland/default.nix index 2825ef3a65636..609da88715661 100644 --- a/pkgs/applications/window-managers/hyprwm/xdg-desktop-portal-hyprland/default.nix +++ b/pkgs/applications/window-managers/hyprwm/xdg-desktop-portal-hyprland/default.nix @@ -24,13 +24,13 @@ }: stdenv.mkDerivation (self: { pname = "xdg-desktop-portal-hyprland"; - version = "1.3.1"; + version = "1.3.2"; src = fetchFromGitHub { owner = "hyprwm"; repo = "xdg-desktop-portal-hyprland"; rev = "v${self.version}"; - hash = "sha256-wP611tGIWBA4IXShWbah7TxqdbvhfcfT2vnXalX/qzk="; + hash = "sha256-KsX7sAwkEFpXiwyjt0HGTnnrUU58wW1jlzj5IA/LRz8="; }; nativeBuildInputs = [ |