2023-05-02 19:54:29 +02: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 14:22:37 +02:00
|
|
|
# Contains what a user is most likely to care about:
|
2023-08-21 14:34:37 +02:00
|
|
|
# Hyprland itself, XDPH and the Share Picker.
|
2024-01-28 21:33:34 +01:00
|
|
|
default = lib.composeManyExtensions (with self.overlays; [
|
2023-08-12 14:22:37 +02:00
|
|
|
hyprland-packages
|
|
|
|
hyprland-extras
|
|
|
|
]);
|
2023-05-02 19:54:29 +02:00
|
|
|
|
2023-08-12 14:22:37 +02:00
|
|
|
# Packages for variations of Hyprland, dependencies included.
|
2024-01-28 21:33:34 +01:00
|
|
|
hyprland-packages = lib.composeManyExtensions [
|
2023-08-12 14:22:37 +02:00
|
|
|
# Dependencies
|
2024-03-09 17:52:59 +01:00
|
|
|
inputs.hyprcursor.overlays.default
|
2024-02-18 16:00:34 +01:00
|
|
|
inputs.hyprlang.overlays.default
|
2024-06-11 17:17:45 +02:00
|
|
|
inputs.hyprutils.overlays.default
|
2024-04-20 14:25:29 +02:00
|
|
|
inputs.hyprwayland-scanner.overlays.default
|
2024-04-21 18:58:54 +02:00
|
|
|
self.overlays.xwayland
|
|
|
|
|
2023-08-12 14:22:37 +02:00
|
|
|
# Hyprland packages themselves
|
2023-12-17 15:29:58 +01:00
|
|
|
(final: prev: let
|
|
|
|
date = mkDate (self.lastModifiedDate or "19700101");
|
|
|
|
in {
|
2023-08-12 14:22:37 +02:00
|
|
|
hyprland = final.callPackage ./default.nix {
|
2023-09-07 10:20:08 +02:00
|
|
|
stdenv = final.gcc13Stdenv;
|
2023-12-17 15:29:58 +01:00
|
|
|
version = "${props.version}+date=${date}_${self.shortRev or "dirty"}";
|
2023-08-12 14:22:37 +02:00
|
|
|
commit = self.rev or "";
|
2023-12-17 15:29:58 +01:00
|
|
|
inherit date;
|
2023-08-12 14:22:37 +02:00
|
|
|
};
|
2024-03-15 09:11:54 +01:00
|
|
|
hyprland-unwrapped = final.hyprland.override {wrapRuntimeDeps = false;};
|
2023-08-12 14:22:37 +02:00
|
|
|
hyprland-debug = final.hyprland.override {debug = true;};
|
2023-12-17 15:29:58 +01:00
|
|
|
hyprland-legacy-renderer = final.hyprland.override {legacyRenderer = true;};
|
2024-04-21 18:58:54 +02:00
|
|
|
|
|
|
|
# deprecated packages
|
2023-11-26 03:58:57 +01: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 18:58:54 +02:00
|
|
|
|
2023-08-01 22:58:01 +02: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 14:22:37 +02:00
|
|
|
final.hyprland;
|
|
|
|
})
|
|
|
|
];
|
2023-05-02 19:54:29 +02:00
|
|
|
|
|
|
|
# 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 [
|
2023-08-12 14:22:37 +02:00
|
|
|
inputs.xdph.overlays.xdg-desktop-portal-hyprland
|
2023-05-02 19:54:29 +02:00
|
|
|
];
|
|
|
|
|
2024-04-21 18:58:54 +02: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 19:54:29 +02:00
|
|
|
};
|
|
|
|
}
|