hyprlandPlugins: expose mkHyprlandPlugin

This change lets users use the function outside of Nixpkgs, as well as
replacing the `hyprland` package that the plugins are built with.
This commit is contained in:
Mihai Fufezan
2024-02-29 23:34:34 +02:00
parent 972f713a59
commit 78fb554096
@@ -5,7 +5,7 @@
, hyprland
}:
let
mkHyprlandPlugin =
mkHyprlandPlugin = hyprland:
args@{ pluginName, ... }:
stdenv.mkDerivation (args // {
pname = "${pluginName}";
@@ -14,15 +14,15 @@ let
++ hyprland.buildInputs
++ (args.buildInputs or [ ]);
meta = args.meta // {
description = (args.meta.description or "");
longDescription = (args.meta.lonqDescription or "") +
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 = {
hy3 = { fetchFromGitHub, cmake, hyprland }:
mkHyprlandPlugin rec {
mkHyprlandPlugin hyprland rec {
pluginName = "hy3";
version = "0.35.0";
@@ -47,5 +47,4 @@ let
};
};
in
lib.mapAttrs (name: plugin: callPackage plugin { }) plugins
(lib.mapAttrs (name: plugin: callPackage plugin { }) plugins) // { inherit mkHyprlandPlugin; }