2023-05-02 20:54:29 +03:00
|
|
|
{
|
|
|
|
self,
|
|
|
|
lib,
|
|
|
|
inputs,
|
|
|
|
}: let
|
|
|
|
props = builtins.fromJSON (builtins.readFile ../props.json);
|
|
|
|
|
|
|
|
mkDate = longDate: (lib.concatStringsSep "-" [
|
|
|
|
(builtins.substring 0 4 longDate)
|
|
|
|
(builtins.substring 4 2 longDate)
|
|
|
|
(builtins.substring 6 2 longDate)
|
|
|
|
]);
|
|
|
|
in {
|
2023-08-12 15:22:37 +03:00
|
|
|
# Contains what a user is most likely to care about:
|
2023-08-21 15:34:37 +03:00
|
|
|
# Hyprland itself, XDPH and the Share Picker.
|
2024-01-28 23:33:34 +03:00
|
|
|
default = lib.composeManyExtensions (with self.overlays; [
|
2023-08-12 15:22:37 +03:00
|
|
|
hyprland-packages
|
|
|
|
hyprland-extras
|
|
|
|
]);
|
2023-05-02 20:54:29 +03:00
|
|
|
|
2023-08-12 15:22:37 +03:00
|
|
|
# Packages for variations of Hyprland, dependencies included.
|
2024-01-28 23:33:34 +03:00
|
|
|
hyprland-packages = lib.composeManyExtensions [
|
2023-08-12 15:22:37 +03:00
|
|
|
# Dependencies
|
2024-03-09 19:52:59 +03:00
|
|
|
inputs.hyprcursor.overlays.default
|
2024-02-18 18:00:34 +03:00
|
|
|
inputs.hyprlang.overlays.default
|
2024-04-20 15:25:29 +03:00
|
|
|
inputs.hyprwayland-scanner.overlays.default
|
2024-04-21 19:58:54 +03:00
|
|
|
self.overlays.xwayland
|
|
|
|
|
2023-08-12 15:22:37 +03:00
|
|
|
# Hyprland packages themselves
|
2023-12-17 17:29:58 +03:00
|
|
|
(final: prev: let
|
|
|
|
date = mkDate (self.lastModifiedDate or "19700101");
|
|
|
|
in {
|
2023-08-12 15:22:37 +03:00
|
|
|
hyprland = final.callPackage ./default.nix {
|
2023-09-07 11:20:08 +03:00
|
|
|
stdenv = final.gcc13Stdenv;
|
2023-12-17 17:29:58 +03:00
|
|
|
version = "${props.version}+date=${date}_${self.shortRev or "dirty"}";
|
2023-08-12 15:22:37 +03:00
|
|
|
commit = self.rev or "";
|
2023-12-17 17:29:58 +03:00
|
|
|
inherit date;
|
2023-08-12 15:22:37 +03:00
|
|
|
};
|
2024-03-15 11:11:54 +03:00
|
|
|
hyprland-unwrapped = final.hyprland.override {wrapRuntimeDeps = false;};
|
2023-08-12 15:22:37 +03:00
|
|
|
hyprland-debug = final.hyprland.override {debug = true;};
|
2023-12-17 17:29:58 +03:00
|
|
|
hyprland-legacy-renderer = final.hyprland.override {legacyRenderer = true;};
|
2024-04-21 19:58:54 +03:00
|
|
|
|
|
|
|
# deprecated packages
|
2023-11-26 05:58:57 +03:00
|
|
|
hyprland-nvidia =
|
|
|
|
builtins.trace ''
|
|
|
|
hyprland-nvidia was removed. Please use the hyprland package.
|
|
|
|
Nvidia patches are no longer needed.
|
|
|
|
''
|
|
|
|
final.hyprland;
|
2024-04-21 19:58:54 +03:00
|
|
|
|
2023-08-01 23:58:01 +03:00
|
|
|
hyprland-hidpi =
|
|
|
|
builtins.trace ''
|
|
|
|
hyprland-hidpi was removed. Please use the hyprland package.
|
|
|
|
For more information, refer to https://wiki.hyprland.org/Configuring/XWayland.
|
|
|
|
''
|
2023-08-12 15:22:37 +03:00
|
|
|
final.hyprland;
|
|
|
|
})
|
|
|
|
];
|
2023-05-02 20:54:29 +03:00
|
|
|
|
|
|
|
# Packages for extra software recommended for usage with Hyprland,
|
|
|
|
# including forked or patched packages for compatibility.
|
2024-01-28 23:33:34 +03:00
|
|
|
hyprland-extras = lib.composeManyExtensions [
|
2023-08-12 15:22:37 +03:00
|
|
|
inputs.xdph.overlays.xdg-desktop-portal-hyprland
|
2023-05-02 20:54:29 +03:00
|
|
|
];
|
|
|
|
|
2024-04-21 19:58:54 +03:00
|
|
|
# Patches XWayland's pkgconfig file to not include Cflags or includedir
|
|
|
|
# The above two variables trip up CMake and the build fails
|
|
|
|
xwayland = final: prev: {
|
|
|
|
xwayland = prev.xwayland.overrideAttrs (old: {
|
|
|
|
postInstall = ''
|
|
|
|
sed -i '/includedir/d' $out/lib/pkgconfig/xwayland.pc
|
|
|
|
'';
|
|
|
|
});
|
2023-05-02 20:54:29 +03:00
|
|
|
};
|
|
|
|
}
|