mirror of
https://github.com/Trensa-Organization/hy3.git
synced 2025-03-16 03:03:40 +01:00
Update to hyprland pkg-config
This also allows hy3 to be built as an output
This commit is contained in:
parent
4c95fc5737
commit
e57d1aec4c
8 changed files with 53 additions and 55 deletions
|
@ -10,12 +10,8 @@ if(CMAKE_EXPORT_COMPILE_COMMANDS)
|
||||||
${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES})
|
${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
IF(NOT DEFINED ENV{HYPRLAND_HEADERS})
|
|
||||||
message(FATAL_ERROR "$HYPRLAND_HEADERS is unset")
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
pkg_check_modules(DEPS REQUIRED pixman-1 libdrm)
|
pkg_check_modules(DEPS REQUIRED hyprland pixman-1 libdrm)
|
||||||
|
|
||||||
add_library(hy3 SHARED
|
add_library(hy3 SHARED
|
||||||
src/main.cpp
|
src/main.cpp
|
||||||
|
@ -23,7 +19,6 @@ add_library(hy3 SHARED
|
||||||
src/SelectionHook.cpp
|
src/SelectionHook.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(hy3 PRIVATE
|
target_include_directories(hy3 PRIVATE ${DEPS_INCLUDE_DIRS})
|
||||||
${DEPS_INCLUDE_DIRS}
|
|
||||||
$ENV{HYPRLAND_HEADERS}
|
install(TARGETS hy3 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
)
|
|
||||||
|
|
54
flake.lock
generated
54
flake.lock
generated
|
@ -1,12 +1,15 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1678901627,
|
"lastModified": 1681202837,
|
||||||
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
|
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
|
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -23,11 +26,11 @@
|
||||||
"xdph": "xdph"
|
"xdph": "xdph"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1680645538,
|
"lastModified": 1682603803,
|
||||||
"narHash": "sha256-H9gAx2U3XKVoI2WjwbOXULL4TYj9y7ctxBB4up0v9tI=",
|
"narHash": "sha256-NY9nVAdB7UyInu2vPx/DIUVNZ83t4RdP16QY9DTIn4s=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "Hyprland",
|
"repo": "Hyprland",
|
||||||
"rev": "a80ba54bbc6a423ab0e79730442e09aea832d9d6",
|
"rev": "f23455e592bca14e0abd9249de467cc71cd2850e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -44,11 +47,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1671839510,
|
"lastModified": 1681065697,
|
||||||
"narHash": "sha256-+PY1qqJfmZzzROgcIY4I7AkCwpnC+qBIYk2eFoA9RWc=",
|
"narHash": "sha256-QPzwwlGKX95tl6ZEshboZbEwwAXww6lNLdVYd6T9Mrc=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "hyprland-protocols",
|
"repo": "hyprland-protocols",
|
||||||
"rev": "b8f55e02a328c47ed373133c52483bbfa20a1b75",
|
"rev": "4d29e48433270a2af06b8bc711ca1fe5109746cd",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -59,11 +62,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1680487167,
|
"lastModified": 1682453498,
|
||||||
"narHash": "sha256-9FNIqrxDZgSliGGN2XJJSvcDYmQbgOANaZA4UWnTdg4=",
|
"narHash": "sha256-WoWiAd7KZt5Eh6n+qojcivaVpnXKqBsVgpixpV2L9CE=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "53dad94e874c9586e71decf82d972dfb640ef044",
|
"rev": "c8018361fa1d1650ee8d4b96294783cf564e8a7f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -83,15 +86,30 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"wlroots": {
|
"wlroots": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"host": "gitlab.freedesktop.org",
|
"host": "gitlab.freedesktop.org",
|
||||||
"lastModified": 1680629978,
|
"lastModified": 1682436395,
|
||||||
"narHash": "sha256-2iVx5zqU2CpMgmtVadsHSkhkAsoxAWKQp6RQqt2OgQY=",
|
"narHash": "sha256-GGEjkQO9m7YLYIXIXM76HWdhjg4Ye+oafOtyaFAYKI4=",
|
||||||
"owner": "wlroots",
|
"owner": "wlroots",
|
||||||
"repo": "wlroots",
|
"repo": "wlroots",
|
||||||
"rev": "835208db98a29431fa687c9506f4b43fe645ff65",
|
"rev": "6830bfc17fd94709e2cdd4da0af989f102a26e59",
|
||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -113,11 +131,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673116118,
|
"lastModified": 1682439384,
|
||||||
"narHash": "sha256-eR0yDSkR2XYMesfdRWJs25kAdXET2mbNNHu5t+KUcKA=",
|
"narHash": "sha256-zHDa8LCZs05TZHQSIZ3ucwyMPglBGHcqTBzfkLjYXTM=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "xdg-desktop-portal-hyprland",
|
"repo": "xdg-desktop-portal-hyprland",
|
||||||
"rev": "d479c846531fd0e1d2357c9588b8310a2b859ef2",
|
"rev": "c0e233955568fbea4e859336f6d3d14d51294d7c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
26
flake.nix
26
flake.nix
|
@ -8,8 +8,8 @@
|
||||||
outputs = { nixpkgs, hyprland, flake-utils, ... }:
|
outputs = { nixpkgs, hyprland, flake-utils, ... }:
|
||||||
flake-utils.lib.eachDefaultSystem (system: let
|
flake-utils.lib.eachDefaultSystem (system: let
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
hyprpkgs = hyprland.packages.${system};
|
hyprland_pkg = hyprland.packages.${system}.hyprland;
|
||||||
in {
|
in rec {
|
||||||
packages.default = pkgs.gcc12Stdenv.mkDerivation {
|
packages.default = pkgs.gcc12Stdenv.mkDerivation {
|
||||||
pname = "hy3";
|
pname = "hy3";
|
||||||
version = "0.1";
|
version = "0.1";
|
||||||
|
@ -17,35 +17,21 @@
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = with pkgs; [
|
||||||
|
hyprland_pkg.dev
|
||||||
cmake
|
cmake
|
||||||
pkg-config
|
pkg-config
|
||||||
];
|
] ++ hyprland_pkg.buildInputs;
|
||||||
|
|
||||||
#HYPRLAND_HEADERS = hyprpkgs.hyprland.src; - TODO
|
|
||||||
};
|
};
|
||||||
|
|
||||||
devShells.default = pkgs.mkShell.override { stdenv = pkgs.gcc12Stdenv; } {
|
devShells.default = pkgs.mkShell.override { stdenv = pkgs.gcc12Stdenv; } {
|
||||||
name = "hy3-shell";
|
name = "hy3-shell";
|
||||||
nativeBuildInputs = with pkgs; [
|
|
||||||
cmake
|
|
||||||
pkg-config
|
|
||||||
|
|
||||||
|
nativeBuildInputs = with pkgs; [
|
||||||
clang-tools_15
|
clang-tools_15
|
||||||
bear
|
bear
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = with pkgs; [
|
inputsFrom = [ packages.default ];
|
||||||
hyprpkgs.wlroots-hyprland
|
|
||||||
libdrm
|
|
||||||
pixman
|
|
||||||
];
|
|
||||||
|
|
||||||
inputsFrom = [
|
|
||||||
hyprpkgs.hyprland
|
|
||||||
hyprpkgs.wlroots-hyprland
|
|
||||||
];
|
|
||||||
|
|
||||||
#HYPRLAND_HEADERS = hyprpkgs.hyprland.src; - TODO
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#include "Hy3Layout.hpp"
|
#include "Hy3Layout.hpp"
|
||||||
#include "SelectionHook.hpp"
|
#include "SelectionHook.hpp"
|
||||||
|
|
||||||
#include <src/Compositor.hpp>
|
#include <hyprland/src/Compositor.hpp>
|
||||||
|
|
||||||
Hy3GroupData::Hy3GroupData(Hy3GroupLayout layout): layout(layout) {}
|
Hy3GroupData::Hy3GroupData(Hy3GroupLayout layout): layout(layout) {}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <src/layout/IHyprLayout.hpp>
|
#include <hyprland/src/layout/IHyprLayout.hpp>
|
||||||
|
|
||||||
class Hy3Layout;
|
class Hy3Layout;
|
||||||
struct Hy3Node;
|
struct Hy3Node;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#include "globals.hpp"
|
#include "globals.hpp"
|
||||||
#include "src/Window.hpp"
|
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||||
#include <src/plugins/PluginAPI.hpp>
|
#include <hyprland/src/Compositor.hpp>
|
||||||
#include <src/Compositor.hpp>
|
|
||||||
|
|
||||||
inline CFunctionHook* g_LastSelectionHook = nullptr;
|
inline CFunctionHook* g_LastSelectionHook = nullptr;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include <src/plugins/PluginAPI.hpp>
|
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||||
#include "Hy3Layout.hpp"
|
#include "Hy3Layout.hpp"
|
||||||
|
|
||||||
inline HANDLE PHANDLE = nullptr;
|
inline HANDLE PHANDLE = nullptr;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include <src/plugins/PluginAPI.hpp>
|
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||||
#include <src/Compositor.hpp>
|
#include <hyprland/src/Compositor.hpp>
|
||||||
|
|
||||||
#include "globals.hpp"
|
#include "globals.hpp"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue