2024-06-24 18:47:55 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
callPackage,
|
|
|
|
pkg-config,
|
|
|
|
stdenv,
|
|
|
|
hyprland,
|
2024-01-02 11:29:13 +00:00
|
|
|
}:
|
|
|
|
let
|
2024-06-24 18:47:55 +00:00
|
|
|
mkHyprlandPlugin =
|
|
|
|
hyprland:
|
2024-01-02 11:29:13 +00:00
|
|
|
args@{ pluginName, ... }:
|
2024-06-24 18:47:55 +00:00
|
|
|
stdenv.mkDerivation (
|
|
|
|
args
|
|
|
|
// {
|
|
|
|
pname = "${pluginName}";
|
|
|
|
nativeBuildInputs = [ pkg-config ] ++ args.nativeBuildInputs or [ ];
|
|
|
|
buildInputs = [ hyprland ] ++ hyprland.buildInputs ++ (args.buildInputs or [ ]);
|
|
|
|
meta = args.meta // {
|
|
|
|
description = args.meta.description or "";
|
|
|
|
longDescription =
|
|
|
|
(args.meta.longDescription or "")
|
|
|
|
+ "\n\nPlugins can be installed via a plugin entry in the Hyprland NixOS or Home Manager options.";
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
2024-06-24 18:47:55 +00:00
|
|
|
}
|
|
|
|
);
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-06-24 18:47:55 +00:00
|
|
|
plugins = lib.mergeAttrsList [
|
|
|
|
{ hy3 = import ./hy3.nix; }
|
|
|
|
(import ./hyprland-plugins.nix)
|
|
|
|
];
|
2024-01-02 11:29:13 +00:00
|
|
|
in
|
2024-06-24 18:47:55 +00:00
|
|
|
(lib.mapAttrs (name: plugin: callPackage plugin { inherit mkHyprlandPlugin; }) plugins)
|
|
|
|
// {
|
|
|
|
inherit mkHyprlandPlugin;
|
|
|
|
}
|