Skip to content

Commit

Permalink
Merge pull request #320347 from fufexan/backport-319131-to-release-24.05
Browse files Browse the repository at this point in the history
[Backport release-24.05] hyprland: 0.40.0-unstable-2024-05-05 -> 0.41.1; hyprwayland-scanner: 0.3.4 -> 0.3.10; hyprlandPlugins.hy3: 0.40.0 -> 0.41.0; hyprutils: init at 0.1.2; hyprlandPlugins: init upstream hyprland-plugins at 0.41.1, hy3: 0.41.0 -> 0.41.1
  • Loading branch information
JohnRTitor authored Jun 23, 2024
2 parents fe7bd5d + 7d10d88 commit 347402c
Show file tree
Hide file tree
Showing 12 changed files with 281 additions and 87 deletions.
Original file line number Diff line number Diff line change
@@ -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;
}
30 changes: 30 additions & 0 deletions pkgs/applications/window-managers/hyprwm/hyprland-plugins/hy3.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
lib,
cmake,
fetchFromGitHub,
hyprland,
mkHyprlandPlugin,
}:
mkHyprlandPlugin hyprland rec {
pluginName = "hy3";
version = "0.41.1";

src = fetchFromGitHub {
owner = "outfoxxed";
repo = "hy3";
rev = "hl${version}";
hash = "sha256-bRLI+zgfT31LCMW4Pf701ZZx2oFeXoBu1BfYQjX6MPc=";
};

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 ];
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
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.1";

hyprland-plugins-src = fetchFromGitHub {
owner = "hyprwm";
repo = "hyprland-plugins";
rev = "v${version}";
hash = "sha256-Bw3JRBUZg2kmDwxa/UHvD//gGcNjbftTj2MSeLvx1q8=";
};
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 ];
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
50 changes: 0 additions & 50 deletions pkgs/applications/window-managers/hyprwm/hyprland/plugins.nix

This file was deleted.

40 changes: 24 additions & 16 deletions pkgs/applications/window-managers/hyprwm/hyprpaper/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,38 @@
, 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
}:

stdenv.mkDerivation (finalAttrs: {
pname = "hyprpaper";
version = "0.6.0";
version = "0.7.0";

src = fetchFromGitHub {
owner = "hyprwm";
repo = finalAttrs.pname;
rev = "v${finalAttrs.version}";
hash = "sha256-mqxnaNiCVJS88Dk4V1v2wdS0RaCbOk8HFOUUbp0Uiy0=";
hash = "sha256-l13c8ALA7ZKDgluYA1C1OfkDGYD6e1/GR6LJnxCLRhA=";
};

nativeBuildInputs = [
Expand All @@ -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
];
Expand All @@ -49,18 +69,6 @@ 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";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/hy/hyprcursor/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
}:
stdenv.mkDerivation (finalAttrs: {
pname = "hyprcursor";
version = "0.1.8";
version = "0.1.9";

src = fetchFromGitHub {
owner = "hyprwm";
repo = "hyprcursor";
rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-zJboXgWNpNhKyNF8H/3UYzWkx7w00TOCGKi3cwi+tsw=";
hash = "sha256-FIN1wMoyePBTtibCbaeJaoKNLuAYIGwLCWAYC1DJanw=";
};

patches = [
Expand Down
7 changes: 7 additions & 0 deletions pkgs/by-name/hy/hyprland/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"branch": "main",
"commit_hash": "9e781040d9067c2711ec2e9f5b47b76ef70762b3",
"commit_message": "props: bump version to 0.41.1",
"date": "2024-06-13",
"tag": "v0.41.1"
}
Loading

0 comments on commit 347402c

Please sign in to comment.