Skip to content
This repository was archived by the owner on Jul 9, 2024. It is now read-only.

Commit 6748bde

Browse files
authored
Merge pull request #107 from spikespaz/main
Flake: Add overlays
2 parents b5911d8 + 9699ede commit 6748bde

File tree

2 files changed

+148
-50
lines changed

2 files changed

+148
-50
lines changed

flake.lock

Lines changed: 113 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,54 @@
11
{
2-
description = "Hyprland Plugins";
2+
description = "Hyprland Plugins (Hycov)";
33

4-
inputs.hyprland.url = "github:hyprwm/Hyprland";
4+
inputs = {
5+
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
6+
nixpkgs.follows = "hyprland/nixpkgs";
7+
systems.follows = "hyprland/systems";
8+
};
59

610
outputs =
711
{ self
812
, hyprland
9-
,
13+
, nixpkgs
14+
, systems
1015
}:
1116
let
12-
inherit (hyprland.inputs) nixpkgs;
13-
withPkgsFor = fn: nixpkgs.lib.genAttrs (builtins.attrNames hyprland.packages) (system: fn system nixpkgs.legacyPackages.${system});
17+
inherit (nixpkgs) lib;
18+
withPkgsFor = fn: lib.genAttrs (import systems) (system:
19+
let
20+
pkgs = import nixpkgs {
21+
localSystem.system = system;
22+
overlays = [
23+
hyprland.overlays.hyprland-packages
24+
self.overlays.default
25+
];
26+
};
27+
in
28+
fn system pkgs);
1429
in
1530
{
16-
packages = withPkgsFor (system: pkgs: {
17-
hycov = pkgs.callPackage ./default.nix {
18-
inherit (hyprland.packages.${system}) hyprland;
19-
stdenv = pkgs.gcc13Stdenv;
31+
overlays = {
32+
default = self.overlays.hycov;
33+
hycov = final: prev: {
34+
hyprlandPlugins = prev.hyprlandPlugins or {} // {
35+
hycov = final.callPackage ./default.nix {
36+
stdenv = final.gcc13Stdenv;
37+
};
38+
};
2039
};
40+
};
41+
42+
packages = withPkgsFor (system: pkgs: {
43+
default = self.packages.${system}.hycov;
44+
inherit (pkgs.hyprlandPlugins) hycov;
2145
});
2246

2347
devShells = withPkgsFor (system: pkgs: {
2448
default = pkgs.mkShell.override { stdenv = pkgs.gcc13Stdenv; } {
2549
name = "hyprland-plugins";
26-
buildInputs = [ hyprland.packages.${system}.hyprland ];
27-
inputsFrom = [ hyprland.packages.${system}.hyprland ];
50+
# buildInputs = [ pkgs.hyprland ];
51+
inputsFrom = [ pkgs.hycov ];
2852
};
2953
});
3054
};

0 commit comments

Comments
 (0)