Skip to content

Commit

Permalink
hyprexpo: add nix derivation & meson
Browse files Browse the repository at this point in the history
  • Loading branch information
fufexan committed Apr 3, 2024
1 parent 58aa63b commit e70b46a
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
});
in {
packages = eachSystem (system: {
inherit (pkgsFor.${system}) borders-plus-plus csgo-vulkan-fix hyprbars hyprtrails hyprwinwrap;
inherit (pkgsFor.${system}) borders-plus-plus csgo-vulkan-fix hyprbars hyprexpo hyprtrails hyprwinwrap;
});

overlays = {
Expand All @@ -46,6 +46,7 @@
borders-plus-plus = callPackage ./borders-plus-plus {};
csgo-vulkan-fix = callPackage ./csgo-vulkan-fix {};
hyprbars = callPackage ./hyprbars {};
hyprexpo = callPackage ./hyprexpo {};
hyprtrails = callPackage ./hyprtrails {};
hyprwinwrap = callPackage ./hyprwinwrap {};
})
Expand Down
19 changes: 19 additions & 0 deletions hyprexpo/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
lib,
hyprland,
hyprlandPlugins,
}:
hyprlandPlugins.mkHyprlandPlugin {
pluginName = "hyprexpo";
version = "0.1";
src = ./.;

inherit (hyprland) nativeBuildInputs;

meta = with lib; {
homepage = "https://github.com/hyprwm/hyprland-plugins";
description = "Hyprland workspaces overview plugin";
license = licenses.bsd3;
platforms = platforms.linux;
};
}
34 changes: 34 additions & 0 deletions hyprexpo/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
project('hyprexpo', '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

add_project_arguments(
[
'-Wno-narrowing',
],
language: 'cpp')

globber = run_command('find', '.', '-name', '*.cpp', check: true)
src = globber.stdout().strip().split('\n')

hyprland = dependency('hyprland')

shared_module(meson.project_name(), src,
dependencies: [
dependency('hyprland'),
dependency('pixman-1'),
dependency('libdrm'),
dependency('pangocairo'),
],
install: true,
)

0 comments on commit e70b46a

Please sign in to comment.