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)
|
|
|
|
]);
|
2023-08-12 14:22:37 +02:00
|
|
|
|
|
|
|
mkJoinedOverlays = overlays: final: prev:
|
|
|
|
lib.foldl' (attrs: overlay: attrs // (overlay final prev)) {} overlays;
|
2023-05-02 19:54:29 +02:00
|
|
|
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.
|
2023-08-12 14:22:37 +02:00
|
|
|
default = mkJoinedOverlays (with self.overlays; [
|
|
|
|
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.
|
|
|
|
hyprland-packages = mkJoinedOverlays [
|
|
|
|
# Dependencies
|
|
|
|
inputs.hyprland-protocols.overlays.default
|
|
|
|
self.overlays.wlroots-hyprland
|
|
|
|
self.overlays.udis86
|
|
|
|
# Hyprland packages themselves
|
|
|
|
(final: prev: {
|
|
|
|
hyprland = final.callPackage ./default.nix {
|
2023-09-07 10:20:08 +02:00
|
|
|
stdenv = final.gcc13Stdenv;
|
2023-08-12 14:22:37 +02:00
|
|
|
version = "${props.version}+date=${mkDate (self.lastModifiedDate or "19700101")}_${self.shortRev or "dirty"}";
|
|
|
|
wlroots = final.wlroots-hyprland;
|
|
|
|
commit = self.rev or "";
|
|
|
|
inherit (final) udis86 hyprland-protocols;
|
|
|
|
};
|
|
|
|
hyprland-unwrapped = final.hyprland.override {wrapRuntimeDeps = false;};
|
|
|
|
hyprland-debug = final.hyprland.override {debug = true;};
|
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;
|
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.
|
2023-08-12 14:22:37 +02:00
|
|
|
hyprland-extras = mkJoinedOverlays [
|
|
|
|
inputs.xdph.overlays.xdg-desktop-portal-hyprland
|
2023-05-02 19:54:29 +02:00
|
|
|
];
|
|
|
|
|
2023-08-12 14:22:37 +02:00
|
|
|
udis86 = final: prev: {
|
|
|
|
udis86 = final.callPackage ./udis86.nix {};
|
|
|
|
};
|
|
|
|
|
2023-05-02 19:54:29 +02:00
|
|
|
# Patched version of wlroots for Hyprland.
|
|
|
|
# It is under a new package name so as to not conflict with
|
|
|
|
# the standard version in nixpkgs.
|
|
|
|
wlroots-hyprland = final: prev: {
|
|
|
|
wlroots-hyprland = final.callPackage ./wlroots.nix {
|
2023-08-12 14:22:37 +02:00
|
|
|
version = "${mkDate (inputs.wlroots.lastModifiedDate or "19700101")}_${inputs.wlroots.shortRev or "dirty"}";
|
2023-05-02 19:54:29 +02:00
|
|
|
src = inputs.wlroots;
|
2023-08-01 22:58:01 +02:00
|
|
|
|
2023-05-02 19:54:29 +02:00
|
|
|
libdisplay-info = prev.libdisplay-info.overrideAttrs (old: {
|
|
|
|
version = "0.1.1+date=2023-03-02";
|
|
|
|
src = final.fetchFromGitLab {
|
|
|
|
domain = "gitlab.freedesktop.org";
|
|
|
|
owner = "emersion";
|
|
|
|
repo = old.pname;
|
|
|
|
rev = "147d6611a64a6ab04611b923e30efacaca6fc678";
|
|
|
|
sha256 = "sha256-/q79o13Zvu7x02SBGu0W5yQznQ+p7ltZ9L6cMW5t/o4=";
|
|
|
|
};
|
|
|
|
});
|
2023-08-01 22:58:01 +02:00
|
|
|
|
2023-05-02 19:54:29 +02:00
|
|
|
libliftoff = prev.libliftoff.overrideAttrs (old: {
|
|
|
|
version = "0.5.0-dev";
|
|
|
|
src = final.fetchFromGitLab {
|
|
|
|
domain = "gitlab.freedesktop.org";
|
|
|
|
owner = "emersion";
|
|
|
|
repo = old.pname;
|
|
|
|
rev = "d98ae243280074b0ba44bff92215ae8d785658c0";
|
|
|
|
sha256 = "sha256-DjwlS8rXE7srs7A8+tHqXyUsFGtucYSeq6X0T/pVOc8=";
|
|
|
|
};
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = toString ["-Wno-error=sign-conversion"];
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|