Merge pull request #196339 from AndersonTorres/hyprland
hyprwm: refactor
This commit is contained in:
commit
f2fb245007
4 changed files with 116 additions and 105 deletions
|
@ -1,79 +0,0 @@
|
|||
{ 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";
|
||||
};
|
||||
}
|
|
@ -0,0 +1,96 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchFromGitLab
|
||||
, cmake
|
||||
, libdrm
|
||||
, libinput
|
||||
, libxcb
|
||||
, libxkbcommon
|
||||
, mesa
|
||||
, pango
|
||||
, pkg-config
|
||||
, wayland
|
||||
, wayland-protocols
|
||||
, wayland-scanner
|
||||
, wlroots
|
||||
, xcbutilwm
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "hyprland";
|
||||
version = "0.6.1beta";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hyprwm";
|
||||
repo = "Hyprland";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-0Msqe2ErAJvnO1zHoB2k6TkDhTYnHRGkvJrfSG12dTU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
wayland-scanner
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libdrm
|
||||
libinput
|
||||
libxcb
|
||||
libxkbcommon
|
||||
mesa
|
||||
pango
|
||||
wayland
|
||||
wayland-protocols
|
||||
xcbutilwm
|
||||
]
|
||||
++ [
|
||||
# INFO: When updating src, remember to synchronize this wlroots with the
|
||||
# exact commit used by upstream
|
||||
(wlroots.overrideAttrs (_: {
|
||||
version = "unstable-2022-06-07";
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.freedesktop.org";
|
||||
owner = "wlroots";
|
||||
repo = "wlroots";
|
||||
rev = "b89ed9015c3fbe8d339e9d65cf70fdca6e5645bc";
|
||||
hash = "sha256-8y3u8CoigjoZOVbA2wCWBHlDNEakv0AVxU46/cOC00s=";
|
||||
};
|
||||
}))
|
||||
];
|
||||
|
||||
# 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
|
||||
${stdenv.cc.targetPrefix}c++ -std=c++20 -w ./main.cpp -o ./hyprctl
|
||||
popd
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm755 ../hyprctl/hyprctl ./Hyprland -t $out/bin
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
inherit (finalAttrs.src.meta) homepage;
|
||||
description = "A dynamic tiling Wayland compositor that doesn't sacrifice on its looks";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ wozeparrot ];
|
||||
inherit (wayland.meta) platforms;
|
||||
mainProgram = "Hyprland";
|
||||
# ofborg failure: g++ does not recognize '-std=c++23'
|
||||
broken = stdenv.isAarch64;
|
||||
};
|
||||
})
|
|
@ -2,24 +2,24 @@
|
|||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, pkg-config
|
||||
, libjpeg
|
||||
, mesa
|
||||
, pango
|
||||
, pkg-config
|
||||
, wayland
|
||||
, wayland-protocols
|
||||
, wayland-scanner
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "hyprpaper";
|
||||
version = "unstable-2022-07-24";
|
||||
version = "unstable-2022-09-30";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hyprwm";
|
||||
repo = pname;
|
||||
rev = "f75fcf01d1f652d55f79032a40d821d2ff78520e";
|
||||
sha256 = "sha256-M2g4NeDoYt32j02cimCR4vWzAzauIzQVQaWgBWXDAtk=";
|
||||
repo = "hyprpaper";
|
||||
rev = "8f4c712950ad6a9bc7c7281c15a63f5fa06ba92b";
|
||||
hash = "sha256-KojBifIOkJ2WmO/lRjQIgPgUnX5Eu10U4VDg+1MB2co=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
prePatch = ''
|
||||
substituteInPlace src/main.cpp \
|
||||
--replace GIT_COMMIT_HASH '"${src.rev}"'
|
||||
--replace GIT_COMMIT_HASH '"${finalAttrs.src.rev}"'
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
|
@ -46,15 +46,20 @@ stdenv.mkDerivation rec {
|
|||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
install -m755 ./hyprpaper $out/bin
|
||||
runHook preInstall
|
||||
|
||||
install -Dm755 ./hyprpaper -t $out/bin
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/hyprwm/hyprpaper";
|
||||
inherit (finalAttrs.src.meta) homepage;
|
||||
description = "A blazing fast wayland wallpaper utility";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ wozeparrot ];
|
||||
inherit (wayland.meta) platforms;
|
||||
# ofborg failure: g++ does not recognize '-std=c++23'
|
||||
broken = stdenv.isAarch64;
|
||||
};
|
||||
}
|
||||
})
|
|
@ -3478,8 +3478,6 @@ with pkgs;
|
|||
|
||||
clipman = callPackage ../tools/wayland/clipman { };
|
||||
|
||||
hyprpaper = callPackage ../tools/wayland/hyprpaper { };
|
||||
|
||||
kabeljau = callPackage ../games/kabeljau { };
|
||||
|
||||
kanshi = callPackage ../tools/wayland/kanshi { };
|
||||
|
@ -4224,18 +4222,9 @@ with pkgs;
|
|||
|
||||
hunt = callPackage ../tools/misc/hunt { };
|
||||
|
||||
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=";
|
||||
};
|
||||
});
|
||||
};
|
||||
hyprland = callPackage ../applications/window-managers/hyprwm/hyprland { };
|
||||
|
||||
hyprpaper = callPackage ../applications/window-managers/hyprwm/hyprpaper { };
|
||||
|
||||
hysteria = callPackage ../tools/networking/hysteria {
|
||||
buildGoModule = buildGo119Module;
|
||||
|
|
Loading…
Reference in a new issue