mirror of
https://github.com/hyprwm/hyprland-plugins.git
synced 2024-11-25 19:55:57 +01:00
hyprbars: add meson.build
This commit is contained in:
parent
42b9a56256
commit
50d3fbe28f
8 changed files with 61 additions and 55 deletions
35
flake.lock
35
flake.lock
|
@ -8,15 +8,16 @@
|
|||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1680031067,
|
||||
"narHash": "sha256-kwywAAnHTx3IohvHDbhgsQjrHdN6ewE/vX+E/9oWmFc=",
|
||||
"owner": "hyprwm",
|
||||
"lastModified": 1681840534,
|
||||
"narHash": "sha256-ONdSYWg+J+XonOPTj8Nc8zcrbyTWolEY0vzqc95H6ZQ=",
|
||||
"owner": "horriblename",
|
||||
"repo": "Hyprland",
|
||||
"rev": "d6241a3086c4abfd21e91e23c83c97c3f80123d4",
|
||||
"rev": "67fd467920535024fa59b39ce965f42537e89b90",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"owner": "horriblename",
|
||||
"ref": "nix-pluginenv",
|
||||
"repo": "Hyprland",
|
||||
"type": "github"
|
||||
}
|
||||
|
@ -29,11 +30,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1671839510,
|
||||
"narHash": "sha256-+PY1qqJfmZzzROgcIY4I7AkCwpnC+qBIYk2eFoA9RWc=",
|
||||
"lastModified": 1681065697,
|
||||
"narHash": "sha256-QPzwwlGKX95tl6ZEshboZbEwwAXww6lNLdVYd6T9Mrc=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland-protocols",
|
||||
"rev": "b8f55e02a328c47ed373133c52483bbfa20a1b75",
|
||||
"rev": "4d29e48433270a2af06b8bc711ca1fe5109746cd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -44,11 +45,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1679172431,
|
||||
"narHash": "sha256-XEh5gIt5otaUbEAPUY5DILUTyWe1goAyeqQtmwaFPyI=",
|
||||
"lastModified": 1681557730,
|
||||
"narHash": "sha256-j2E3639kS3Qop2jQPyqWCdenZNaqIdxfoTvAHnGuAGI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1603d11595a232205f03d46e635d919d1e1ec5b9",
|
||||
"rev": "85b081528b937df4bfcaee80c3541b58f397df8b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -67,11 +68,11 @@
|
|||
"flake": false,
|
||||
"locked": {
|
||||
"host": "gitlab.freedesktop.org",
|
||||
"lastModified": 1679340088,
|
||||
"narHash": "sha256-/1KiYoBivDj8HC/eVK2Tr2WYkVdKJxq2Lb0tQs0qqJo=",
|
||||
"lastModified": 1680810405,
|
||||
"narHash": "sha256-LmI/4Yp/pOOoI4RxLRx9I90NBsiqdRLVOfbATKlgpkg=",
|
||||
"owner": "wlroots",
|
||||
"repo": "wlroots",
|
||||
"rev": "1d64e12391a638201c679e71d4e22bb45e5faa8e",
|
||||
"rev": "7abda952d0000b72d240fe1d41457b9288f0b6e5",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
|
@ -93,11 +94,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1673116118,
|
||||
"narHash": "sha256-eR0yDSkR2XYMesfdRWJs25kAdXET2mbNNHu5t+KUcKA=",
|
||||
"lastModified": 1681127512,
|
||||
"narHash": "sha256-vklOOhBj5W8fii6yN4L2WY5ZeifBmsq3+mJ2wC1Pk9U=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "xdg-desktop-portal-hyprland",
|
||||
"rev": "d479c846531fd0e1d2357c9588b8310a2b859ef2",
|
||||
"rev": "04f579377a32781ce57c9cf4ba2a5bcb7f53fa97",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
inputs.hyprland.url = "github:hyprwm/Hyprland";
|
||||
inputs.hyprland.url = "github:horriblename/Hyprland/nix-pluginenv";
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
|
@ -11,7 +11,6 @@
|
|||
packages = withPkgsFor (system: pkgs: {
|
||||
hyprbars = pkgs.callPackage ./hyprbars {
|
||||
inherit (hyprland.packages.${system}) hyprland;
|
||||
wlroots = hyprland.packages.${system}.wlroots-hyprland;
|
||||
};
|
||||
});
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "barDeco.hpp"
|
||||
|
||||
#include <src/Compositor.hpp>
|
||||
#include <src/Window.hpp>
|
||||
#include <hyprland/src/Compositor.hpp>
|
||||
#include <hyprland/src/Window.hpp>
|
||||
|
||||
#include "globals.hpp"
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#define WLR_USE_UNSTABLE
|
||||
|
||||
#include <src/render/decorations/IHyprWindowDecoration.hpp>
|
||||
#include <src/render/OpenGL.hpp>
|
||||
#include <hyprland/src/render/decorations/IHyprWindowDecoration.hpp>
|
||||
#include <hyprland/src/render/OpenGL.hpp>
|
||||
#include "globals.hpp"
|
||||
|
||||
class CHyprBar : public IHyprWindowDecoration {
|
||||
|
|
|
@ -1,39 +1,21 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
hyprland,
|
||||
pkg-config,
|
||||
pixman,
|
||||
libdrm,
|
||||
wlroots,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
name = "hyprbars";
|
||||
version = "0.1";
|
||||
src = ./.;
|
||||
preConfigure = "rm Makefile";
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
inherit (hyprland) nativeBuildInputs;
|
||||
|
||||
buildInputs = [
|
||||
pixman
|
||||
libdrm
|
||||
wlroots
|
||||
];
|
||||
buildInputs = [hyprland] ++ hyprland.buildInputs;
|
||||
|
||||
buildPhase = ''
|
||||
trap "set +x" err
|
||||
set -xeu
|
||||
|
||||
$CXX --no-gnu-unique -shared \
|
||||
-std=c++23 \
|
||||
$(pkg-config --cflags pixman-1) \
|
||||
$(pkg-config --cflags libdrm) \
|
||||
$(pkg-config --cflags wlroots) \
|
||||
-I${hyprland.src}/ \
|
||||
main.cpp barDeco.cpp \
|
||||
-o $out
|
||||
|
||||
set +x
|
||||
'';
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/hyprwm/hyprland-plugins";
|
||||
description = "Hyprland window bar plugin";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include <src/plugins/PluginAPI.hpp>
|
||||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
|
@ -3,9 +3,9 @@
|
|||
#include <unistd.h>
|
||||
|
||||
#include <any>
|
||||
#include <src/Compositor.hpp>
|
||||
#include <src/Window.hpp>
|
||||
#include <src/config/ConfigManager.hpp>
|
||||
#include <hyprland/src/Compositor.hpp>
|
||||
#include <hyprland/src/Window.hpp>
|
||||
#include <hyprland/src/config/ConfigManager.hpp>
|
||||
|
||||
#include "barDeco.hpp"
|
||||
#include "globals.hpp"
|
||||
|
|
24
hyprbars/meson.build
Normal file
24
hyprbars/meson.build
Normal file
|
@ -0,0 +1,24 @@
|
|||
project('hyprbars', 'cpp',
|
||||
version: '0.1',
|
||||
default_options: ['buildtype=release'],
|
||||
)
|
||||
|
||||
cpp_compiler = meson.get_compiler('cpp')
|
||||
if cpp_compiler.has_argument('-std=c++23')
|
||||
add_global_arguments('-std=c++23', language: 'cpp')
|
||||
elif cpp_compiler.has_argument('-std=c++2b')
|
||||
add_global_arguments('-std=c++2b', language: 'cpp')
|
||||
else
|
||||
error('Could not configure current C++ compiler (' + cpp_compiler.get_id() + ' ' + cpp_compiler.version() + ') with required C++ standard (C++23)')
|
||||
endif
|
||||
|
||||
globber = run_command('find', '.', '-name', '*.cpp', check: true)
|
||||
src = globber.stdout().strip().split('\n')
|
||||
|
||||
shared_module('hyprbars', src,
|
||||
dependencies: [
|
||||
dependency('pixman-1'),
|
||||
dependency('libdrm')
|
||||
],
|
||||
install: true,
|
||||
)
|
Loading…
Reference in a new issue