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

Commit

Permalink
Merge pull request #107 from spikespaz/main
Browse files Browse the repository at this point in the history
Flake: Add overlays
  • Loading branch information
DreamMaoMao authored Jun 20, 2024
2 parents b5911d8 + 9699ede commit 6748bde
Show file tree
Hide file tree
Showing 2 changed files with 148 additions and 50 deletions.
152 changes: 113 additions & 39 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 35 additions & 11 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,30 +1,54 @@
{
description = "Hyprland Plugins";
description = "Hyprland Plugins (Hycov)";

inputs.hyprland.url = "github:hyprwm/Hyprland";
inputs = {
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
nixpkgs.follows = "hyprland/nixpkgs";
systems.follows = "hyprland/systems";
};

outputs =
{ self
, hyprland
,
, nixpkgs
, systems
}:
let
inherit (hyprland.inputs) nixpkgs;
withPkgsFor = fn: nixpkgs.lib.genAttrs (builtins.attrNames hyprland.packages) (system: fn system nixpkgs.legacyPackages.${system});
inherit (nixpkgs) lib;
withPkgsFor = fn: lib.genAttrs (import systems) (system:
let
pkgs = import nixpkgs {
localSystem.system = system;
overlays = [
hyprland.overlays.hyprland-packages
self.overlays.default
];
};
in
fn system pkgs);
in
{
packages = withPkgsFor (system: pkgs: {
hycov = pkgs.callPackage ./default.nix {
inherit (hyprland.packages.${system}) hyprland;
stdenv = pkgs.gcc13Stdenv;
overlays = {
default = self.overlays.hycov;
hycov = final: prev: {
hyprlandPlugins = prev.hyprlandPlugins or {} // {
hycov = final.callPackage ./default.nix {
stdenv = final.gcc13Stdenv;
};
};
};
};

packages = withPkgsFor (system: pkgs: {
default = self.packages.${system}.hycov;
inherit (pkgs.hyprlandPlugins) hycov;
});

devShells = withPkgsFor (system: pkgs: {
default = pkgs.mkShell.override { stdenv = pkgs.gcc13Stdenv; } {
name = "hyprland-plugins";
buildInputs = [ hyprland.packages.${system}.hyprland ];
inputsFrom = [ hyprland.packages.${system}.hyprland ];
# buildInputs = [ pkgs.hyprland ];
inputsFrom = [ pkgs.hycov ];
};
});
};
Expand Down

0 comments on commit 6748bde

Please sign in to comment.