aboutsummaryrefslogtreecommitdiffhomepage
path: root/flake.nix
blob: 91dfc5f0b82faf814bf61a62867a7766cf7e44b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# 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 = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    utils.url = "github:numtide/flake-utils";
    nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
  };

  outputs = { self, nixpkgs, utils, nixpkgs-wayland }:
    {
      overlay = final: prev: {
        hyprland = prev.callPackage self {
          src = self;
          inherit (nixpkgs-wayland.overlay.waylandPkgs) wlroots;
        };
      };
    } // utils.lib.eachDefaultSystem (system:
      let pkgs = nixpkgs.legacyPackages.${system};
      in rec {
        overlays = [ self.overlay ];
        packages = {
          hyprland = pkgs.callPackage self {
            src = self;
            inherit (nixpkgs-wayland.packages.${system}) wlroots;
          };
        };
        defaultPackage = packages.hyprland;
        apps.hyprland = utils.lib.mkApp { drv = packages.hyprland; };
        defaultApp = apps.hyprland;
        apps.default =
          utils.lib.mkApp { drv = self.packages."${system}".hyprland; };
      });
}