mirror of
https://github.com/hyprwm/hyprland-plugins.git
synced 2024-11-25 03:35:59 +01:00
Nix: simplify building, add checks
This commit is contained in:
parent
597e29a501
commit
7b5b82f666
1 changed files with 21 additions and 29 deletions
50
flake.nix
50
flake.nix
|
@ -3,41 +3,33 @@
|
|||
|
||||
inputs.hyprland.url = "github:hyprwm/Hyprland";
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
hyprland,
|
||||
}: let
|
||||
inherit (hyprland.inputs) nixpkgs;
|
||||
withPkgsFor = fn: nixpkgs.lib.genAttrs (builtins.attrNames hyprland.packages) (system: fn system nixpkgs.legacyPackages.${system});
|
||||
outputs = inputs: let
|
||||
inherit (inputs.hyprland.inputs) nixpkgs;
|
||||
withPkgsFor = fn: nixpkgs.lib.genAttrs (builtins.attrNames inputs.hyprland.packages) (system: fn system nixpkgs.legacyPackages.${system});
|
||||
in {
|
||||
packages = withPkgsFor (system: pkgs: {
|
||||
borders-plus-plus = pkgs.callPackage ./borders-plus-plus {
|
||||
inherit (hyprland.packages.${system}) hyprland;
|
||||
stdenv = pkgs.gcc13Stdenv;
|
||||
};
|
||||
csgo-vulkan-fix = pkgs.callPackage ./csgo-vulkan-fix {
|
||||
inherit (hyprland.packages.${system}) hyprland;
|
||||
stdenv = pkgs.gcc13Stdenv;
|
||||
};
|
||||
hyprbars = pkgs.callPackage ./hyprbars {
|
||||
inherit (hyprland.packages.${system}) hyprland;
|
||||
stdenv = pkgs.gcc13Stdenv;
|
||||
};
|
||||
hyprtrails = pkgs.callPackage ./hyprtrails {
|
||||
inherit (hyprland.packages.${system}) hyprland;
|
||||
stdenv = pkgs.gcc13Stdenv;
|
||||
};
|
||||
hyprwinwrap = pkgs.callPackage ./hyprwinwrap {
|
||||
inherit (hyprland.packages.${system}) hyprland;
|
||||
stdenv = pkgs.gcc13Stdenv;
|
||||
};
|
||||
packages = withPkgsFor (system: pkgs: let
|
||||
hyprland = inputs.hyprland.packages.${system}.hyprland;
|
||||
buildPlugin = path: extraArgs:
|
||||
pkgs.callPackage path {
|
||||
inherit hyprland;
|
||||
inherit (hyprland) stdenv;
|
||||
}
|
||||
// extraArgs;
|
||||
in {
|
||||
borders-plus-plus = buildPlugin ./borders-plus-plus {};
|
||||
csgo-vulkan-fix = buildPlugin ./csgo-vulkan-fix {};
|
||||
hyprbars = buildPlugin ./hyprbars {};
|
||||
hyprtrails = buildPlugin ./hyprtrails {};
|
||||
hyprwinwrap = buildPlugin ./hyprwinwrap {};
|
||||
});
|
||||
|
||||
checks = withPkgsFor (system: pkgs: inputs.self.packages.${system});
|
||||
|
||||
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 = [inputs.hyprland.packages.${system}.hyprland];
|
||||
inputsFrom = [inputs.hyprland.packages.${system}.hyprland];
|
||||
};
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue