forked from horriblename/hyprgrass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
44 lines (40 loc) · 1.43 KB
/
flake.nix
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
36
37
38
39
40
41
42
43
44
{
description = "Hyprland plugin for touch gestures";
inputs.hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
outputs = {
self,
hyprland,
} @ inputs: let
inherit (hyprland.inputs) nixpkgs;
withPkgsFor = fn: nixpkgs.lib.genAttrs (builtins.attrNames hyprland.packages) (system: fn system nixpkgs.legacyPackages.${system});
in {
packages = withPkgsFor (system: pkgs: let
hyprgrassPackage = pkgs.callPackage ./nix/default.nix {
inherit (hyprland.packages.${system}) hyprland;
inherit (self.packages.${system}) wf-touch;
};
in {
inherit inputs;
default = hyprgrassPackage;
hyprgrass = hyprgrassPackage;
hyprgrassWithTests = hyprgrassPackage.override {runTests = true;};
wf-touch = pkgs.callPackage ./nix/wf-touch.nix {};
});
devShells = withPkgsFor (system: pkgs: {
default = pkgs.mkShell {
shellHook = ''
meson setup build --reconfigure
sed -e 's/c++23/c++2b/g' ./build/compile_commands.json > ./compile_commands.json
'';
name = "hyprgrass-shell";
nativeBuildInputs = with pkgs; [gcc13 meson pkg-config ninja];
buildInputs = [hyprland.packages.${system}.hyprland];
inputsFrom = [
hyprland.packages.${system}.hyprland
self.packages.${system}.default
];
};
});
formatter = withPkgsFor (_system: pkgs: pkgs.alejandra);
};
}