Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[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 #320347

Merged
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,27 @@ let

plugins = {
hy3 = { fetchFromGitHub, cmake, hyprland }:
mkHyprlandPlugin hyprland {
mkHyprlandPlugin hyprland rec {
pluginName = "hy3";
version = "0.40.0";
version = "0.41.0";

src = fetchFromGitHub {
owner = "outfoxxed";
repo = "hy3";
rev = "hl0.40.0";
hash = "sha256-Y9bIML3C5xyKKv+Yel4LUfSkScwGunOVZkg+Z1dPwHI=";
rev = "hl${version}";
hash = "sha256-gEEWWlQRvejSR2RRg78Lubz6siIgknqj6CslveyyIP4=";
};

nativeBuildInputs = [ cmake ];

dontStrip = true;

meta = with lib; {
meta = {
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 ];
license = lib.licenses.gpl3;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ aacebedo ];
};
};
};
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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,29 @@
, 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
Expand All @@ -47,30 +55,41 @@
, 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";

stdenv.mkDerivation (finalAttrs: {
pname = "hyprland" + lib.optionalString debug "-debug";
version = "0.40.0-unstable-2024-05-05";
version = "0.41.1";

src = fetchFromGitHub {
owner = "hyprwm";
repo = finalAttrs.pname;
fetchSubmodules = true;
rev = "f15513309b24790099d42974274eb23f66f7c985";
hash = "sha256-zKOfgXPTlRqCR+EME4qjN9rgAnC3viI5KWx10dhKszw=";
rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-hLnnNBWP1Qjs1I3fndMgp8rbWJruxdnGTq77A4Rv4R4=";
};

postPatch = ''
# Fix hardcoded paths to /usr installation
sed -i "s#/usr#$out#" src/render/OpenGL.cpp

# Remove extra @PREFIX@ to fix pkg-config paths
sed -i "s#@PREFIX@/##g" hyprland.pc.in
'';

# used by version.sh
DATE = "2024-05-05";
HASH = finalAttrs.src.rev;
# variables used by generateVersion.sh script, and shown in `hyprctl version`
BRANCH = info.branch;
COMMITS = info.commit_hash;
DATE = info.date;
DIRTY = "";
HASH = info.commit_hash;
MESSAGE = info.commit_message;
TAG = info.tag;

depsBuildBuild = [
# to find wayland-scanner when cross-compiling
Expand Down Expand Up @@ -98,20 +117,28 @@ stdenv.mkDerivation (finalAttrs: {

buildInputs = [
cairo
expat
fribidi
git
hyprcursor
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
Expand Down Expand Up @@ -152,11 +179,16 @@ stdenv.mkDerivation (finalAttrs: {

passthru.providedSessions = [ "hyprland" ];

meta = with lib; {
passthru.updateScript = ./update.sh;

meta = {
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 ];
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [
wozeparrot
fufexan
];
mainProgram = "Hyprland";
platforms = lib.platforms.linux;
};
Expand Down
35 changes: 35 additions & 0 deletions pkgs/by-name/hy/hyprland/update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p common-updater-scripts fd jq

set -eou pipefail

latest_release="$(curl --silent 'https://api.github.com/repos/hyprwm/Hyprland/releases/latest')"
latest_tag="$(curl --silent 'https://api.github.com/repos/hyprwm/Hyprland/tags?per_page=1')"
commit_hash="$(jq -r '.[0].commit.sha' <<<"$latest_tag")"
latest_commit="$(curl --silent 'https://api.github.com/repos/hyprwm/Hyprland/commits/'"$commit_hash"'')"
commit_message="$(jq -r '.commit.message' <<<"$latest_commit")"

tag=$(jq -r '.tag_name' <<<"$latest_release")
# drop 'v' prefix
version="${tag#v}"

branch=$(jq -r '.target_commitish' <<<"$latest_release")

date=$(jq -r '.created_at' <<<"$latest_release")
# truncate time
date=${date%T*}

# update version; otherwise fail
update-source-version hyprland "$version" --ignore-same-hash

# find hyprland dir
files="$(fd --full-path /hyprland/ | head -1)"
dir="${files%/*}"

echo -e '{
"branch": "'"$branch"'",
"commit_hash": "'"$commit_hash"'",
"commit_message": "'"$commit_message"'",
"date": "'"$date"'",
"tag": "'"$tag"'"
}' >"$dir/info.json"
35 changes: 35 additions & 0 deletions pkgs/by-name/hy/hyprutils/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
lib,
stdenv,
cmake,
fetchFromGitHub,
}:

stdenv.mkDerivation (finalAttrs: {
pname = "hyprutils";
version = "0.1.2";

src = fetchFromGitHub {
owner = "hyprwm";
repo = "hyprutils";
rev = "v${finalAttrs.version}";
hash = "sha256-8KvVqtApNt4FWTdn1TqVvw00rpqyG9UuUPA2ilPVD1U=";
};

nativeBuildInputs = [ cmake ];

outputs = [ "out" "dev" ];

doCheck = false;

meta = {
homepage = "https://github.com/hyprwm/hyprutils";
description = "Small C++ library for utilities used across the Hypr* ecosystem";
license = lib.licenses.bsd3;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [
donovanglover
johnrtitor
];
};
})
16 changes: 10 additions & 6 deletions pkgs/by-name/hy/hyprwayland-scanner/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@
, cmake
, pkg-config
, pugixml
, nix-update-script
,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "hyprwayland-scanner";
version = "0.3.4";
version = "0.3.10";

src = fetchFromGitHub {
owner = "hyprwm";
repo = "hyprwayland-scanner";
rev = "v${finalAttrs.version}";
hash = "sha256-D0pg+ZRwrt4lavZ97Ca8clsgbPA3duLj8iEM7riaIFY=";
hash = "sha256-YxmfxHfWed1fosaa7fC1u7XoKp1anEZU+7Lh/ojRKoM=";
};

nativeBuildInputs = [
Expand All @@ -28,12 +29,15 @@ stdenv.mkDerivation (finalAttrs: {

doCheck = true;

meta = with lib; {
passthru.updateScript = nix-update-script { };

meta = {
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 ];
changelog = "https://github.com/hyprwm/hyprwayland-scanner/releases/tag/${finalAttrs.version}";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ fufexan ];
mainProgram = "hyprwayland-scanner";
platforms = platforms.linux;
platforms = lib.platforms.linux;
};
})
4 changes: 1 addition & 3 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5509,8 +5509,6 @@ with pkgs;
hypr = callPackage ../applications/window-managers/hyprwm/hypr {
cairo = cairo.override { xcbSupport = true; }; };

hyprland = callPackage ../applications/window-managers/hyprwm/hyprland { };

hyprland-autoname-workspaces = callPackage ../applications/misc/hyprland-autoname-workspaces { };

hyprland-per-window-layout = callPackage ../tools/wayland/hyprland-per-window-layout { };
Expand All @@ -5525,7 +5523,7 @@ with pkgs;

hyprshade = python311Packages.callPackage ../applications/window-managers/hyprwm/hyprshade { };

hyprlandPlugins = recurseIntoAttrs (callPackage ../applications/window-managers/hyprwm/hyprland/plugins.nix { });
hyprlandPlugins = recurseIntoAttrs (callPackage ../applications/window-managers/hyprwm/hyprland-plugins { });

hysteria = callPackage ../tools/networking/hysteria { };

Expand Down