Hyprland/nix/overlays.nix

129 lines
3.9 KiB
Nix
Raw Normal View History

{
self,
lib,
inputs,
2026-03-02 20:56:00 +02:00
}:
let
mkDate =
longDate:
(lib.concatStringsSep "-" [
(builtins.substring 0 4 longDate)
(builtins.substring 4 2 longDate)
(builtins.substring 6 2 longDate)
]);
ver = lib.removeSuffix "\n" (builtins.readFile ../VERSION);
2026-03-02 20:56:00 +02:00
in
{
# Contains what a user is most likely to care about:
# Hyprland itself, XDPH and the Share Picker.
2026-03-02 20:56:00 +02:00
default = lib.composeManyExtensions (
with self.overlays;
[
hyprland-packages
hyprland-extras
]
);
# Packages for variations of Hyprland, dependencies included.
2024-01-28 21:33:34 +01:00
hyprland-packages = lib.composeManyExtensions [
# Dependencies
inputs.aquamarine.overlays.default
inputs.hyprcursor.overlays.default
inputs.hyprgraphics.overlays.default
2024-09-22 21:19:09 +03:00
inputs.hyprland-protocols.overlays.default
inputs.hyprland-guiutils.overlays.default
inputs.hyprlang.overlays.default
inputs.hyprutils.overlays.default
inputs.hyprwayland-scanner.overlays.default
inputs.hyprwire.overlays.default
self.overlays.udis86
self.overlays.glaze
# Hyprland packages themselves
2026-03-02 20:56:00 +02:00
(
final: _prev:
let
date = mkDate (self.lastModifiedDate or "19700101");
version = "${ver}+date=${date}_${self.shortRev or "dirty"}";
in
{
hyprland = final.callPackage ./default.nix {
stdenv = final.gcc15Stdenv;
commit = self.rev or "";
revCount = self.sourceInfo.revCount or "";
inherit date version;
};
hyprland-unwrapped = final.hyprland.override { wrapRuntimeDeps = false; };
2026-03-02 20:56:00 +02:00
hyprland-with-tests = final.hyprland.override { withTests = true; };
2026-03-02 20:56:00 +02:00
hyprland-with-hyprtester = builtins.trace ''
2025-11-17 09:10:00 +02:00
hyprland-with-hyprtester was removed. Please use the hyprland package.
Hyprtester is always built now.
2026-03-02 20:56:00 +02:00
'' final.hyprland;
2026-03-02 20:56:00 +02:00
# deprecated packages
hyprland-legacy-renderer = builtins.trace ''
hyprland-legacy-renderer was removed. Please use the hyprland package.
Legacy renderer is no longer supported.
2026-03-02 20:56:00 +02:00
'' final.hyprland;
2026-03-02 20:56:00 +02:00
hyprland-nvidia = builtins.trace ''
2023-11-26 02:58:57 +00:00
hyprland-nvidia was removed. Please use the hyprland package.
Nvidia patches are no longer needed.
2026-03-02 20:56:00 +02:00
'' final.hyprland;
2026-03-02 20:56:00 +02:00
hyprland-hidpi = builtins.trace ''
hyprland-hidpi was removed. Please use the hyprland package.
2025-06-20 01:45:06 +03:00
For more information, refer to https://wiki.hypr.land/Configuring/XWayland.
2026-03-02 20:56:00 +02:00
'' final.hyprland;
}
)
];
# Debug
hyprland-debug = lib.composeManyExtensions [
# Dependencies
self.overlays.hyprland-packages
2026-03-02 20:56:00 +02:00
(_final: prev: {
aquamarine = prev.aquamarine.override { debug = true; };
hyprutils = prev.hyprutils.override { debug = true; };
hyprland-debug = prev.hyprland.override { debug = true; };
})
];
# Packages for extra software recommended for usage with Hyprland,
# including forked or patched packages for compatibility.
2024-01-28 21:33:34 +01:00
hyprland-extras = lib.composeManyExtensions [
inputs.xdph.overlays.default
];
# udis86 from nixpkgs is too old, and also does not provide a .pc file
# this version is the one used in the git submodule, and allows us to
# fetch the source without '?submodules=1'
udis86 = final: prev: {
2026-03-02 20:56:00 +02:00
udis86-hyprland = prev.udis86.overrideAttrs (
_self: _super: {
src = final.fetchFromGitHub {
owner = "canihavesomecoffee";
repo = "udis86";
rev = "5336633af70f3917760a6d441ff02d93477b0c86";
hash = "sha256-HifdUQPGsKQKQprByeIznvRLONdOXeolOsU5nkwIv3g=";
};
2026-03-02 20:56:00 +02:00
patches = [ ];
}
);
};
# Even though glaze itself disables it by default, nixpkgs sets ENABLE_SSL set to true.
# Since we don't include openssl, the build failes without the `enableSSL = false;` override
2026-03-02 20:56:00 +02:00
glaze = _final: prev: {
glaze-hyprland = prev.glaze.override {
enableSSL = false;
enableInterop = false;
};
};
}