Hyprland/flake.nix

44 lines
1.5 KiB
Nix
Raw Normal View History

# Based on fortuneteller2k's (https://github.com/fortuneteller2k/nixpkgs-f2k) package repo
{
description =
"Hyprland is a dynamic tiling Wayland compositor that doesn't sacrifice on its looks.";
inputs = {
2022-05-16 18:01:28 +03:00
nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11";
utils.url = "github:numtide/flake-utils";
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
2022-05-16 18:01:28 +03:00
wlroots-git = {
url = "gitlab:wlroots/wlroots?host=gitlab.freedesktop.org";
flake = false;
};
};
2022-05-16 18:01:28 +03:00
outputs = { self, nixpkgs, utils, nixpkgs-wayland, wlroots-git }:
{
overlay = final: prev: {
hyprland = prev.callPackage self {
src = self;
2022-05-16 18:01:28 +03:00
wlroots = (nixpkgs-wayland.overlays.default final prev).wlroots.overrideAttrs (prev: rec {
src = wlroots-git;
});
};
};
2022-05-15 23:40:26 +03:00
overlays.default = self.overlay;
} // utils.lib.eachSystem [ "aarch64-linux" "x86_64-linux" ] (system:
let pkgs = nixpkgs.legacyPackages.${system};
in rec {
packages = {
2022-05-08 20:23:49 +03:00
hyprland = pkgs.callPackage self {
src = self;
2022-05-16 18:01:28 +03:00
wlroots = nixpkgs-wayland.packages.${system}.wlroots.overrideAttrs (prev: rec {
src = wlroots-git;
});
};
};
defaultPackage = packages.hyprland;
apps.hyprland = utils.lib.mkApp { drv = packages.hyprland; };
defaultApp = apps.hyprland;
apps.default =
2022-05-15 23:40:26 +03:00
utils.lib.mkApp { drv = self.packages.${system}.hyprland; };
});
}