depot/third_party/nixpkgs/pkgs/applications/window-managers/hyprwm/hyprland-plugins/default.nix
Default email 83627f9931 Project import generated by Copybara.
GitOrigin-RevId: 2893f56de08021cffd9b6b6dfc70fd9ccd51eb60
2024-06-24 14:47:55 -04:00

35 lines
907 B
Nix

{
lib,
callPackage,
pkg-config,
stdenv,
hyprland,
}:
let
mkHyprlandPlugin =
hyprland:
args@{ pluginName, ... }:
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.";
};
}
);
plugins = lib.mergeAttrsList [
{ hy3 = import ./hy3.nix; }
(import ./hyprland-plugins.nix)
];
in
(lib.mapAttrs (name: plugin: callPackage plugin { inherit mkHyprlandPlugin; }) plugins)
// {
inherit mkHyprlandPlugin;
}