Parent directory

flake.nix

1181 bytes
 1{
 2  inputs = {
 3    hyprland.url = "github:hyprwm/hyprland/36b2e0cfe0c6094dbc47bd42a437431315bb3087";
 4  };
 5
 6  outputs = {
 7    self,
 8    hyprland,
 9    ...
10  }: let
11    inherit (hyprland.inputs) nixpkgs;
12
13    hyprlandSystems = fn:
14      nixpkgs.lib.genAttrs
15      (builtins.attrNames hyprland.packages)
16      (system: fn system nixpkgs.legacyPackages.${system});
17
18    hyprlandVersion = nixpkgs.lib.removeSuffix "\n" (builtins.readFile "${hyprland}/VERSION");
19  in {
20    packages = hyprlandSystems (system: pkgs: rec {
21      hy3 = pkgs.callPackage ./default.nix {
22        hyprland = hyprland.packages.${system}.hyprland;
23        hlversion = hyprlandVersion;
24      };
25      default = hy3;
26    });
27
28    devShells = hyprlandSystems (system: pkgs: {
29      default = import ./shell.nix {
30        inherit pkgs;
31        hlversion = hyprlandVersion;
32        hyprland = hyprland.packages.${system}.hyprland;
33      };
34
35      impure = import ./shell.nix {
36        pkgs = import <nixpkgs> {};
37        hlversion = hyprlandVersion;
38        hyprland = (pkgs.appendOverlays [hyprland.overlays.hyprland-packages]).hyprland.overrideAttrs {
39          dontStrip = true;
40        };
41      };
42    });
43  };
44}