-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathflake.nix
59 lines (53 loc) · 1.89 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
description = "Hyprland plugin for touch gestures";
inputs.hyprland.url = "github:hyprwm/Hyprland";
outputs = {
self,
hyprland,
} @ inputs: let
inherit (hyprland.inputs) nixpkgs;
withPkgsFor = fn:
nixpkgs.lib.genAttrs (builtins.attrNames hyprland.packages) (system:
fn system (import nixpkgs {
inherit system;
overlays = [hyprland.overlays.hyprland-packages];
}));
in {
# for debugging
inherit inputs;
packages = withPkgsFor (system: pkgs: let
tag = pkgs.lib.replaceStrings ["\n" "v"] ["" ""] (builtins.readFile ./VERSION);
commit = self.shortRev or "dirty";
hyprgrassPackage = pkgs.callPackage ./nix/default.nix {
inherit (hyprland.packages.${system}) hyprland;
inherit (self.packages.${system}) wf-touch;
inherit tag commit;
};
in {
inherit inputs;
default = hyprgrassPackage;
hyprgrass = hyprgrassPackage;
hyprgrassWithTests = hyprgrassPackage.override {runTests = true;};
hyprgrass-pulse = pkgs.callPackage ./nix/hyprgrass-pulse.nix {inherit tag commit;};
wf-touch = pkgs.callPackage ./nix/wf-touch.nix {};
});
devShells = withPkgsFor (system: pkgs: let
hyprlandPkgs = hyprland.packages.${system};
in {
default = pkgs.mkShell.override {inherit (hyprlandPkgs.hyprland) stdenv;} {
shellHook = ''
meson setup build -Dhyprgrass-pulse=true --reconfigure
sed -e 's/c++23/c++2b/g' ./build/compile_commands.json > ./compile_commands.json
'';
name = "hyprgrass-shell";
nativeBuildInputs = with pkgs; [meson pkg-config ninja];
buildInputs = [hyprlandPkgs.hyprland pkgs.libpulseaudio];
inputsFrom = [
hyprlandPkgs.hyprland
self.packages.${system}.default
];
};
});
formatter = withPkgsFor (_system: pkgs: pkgs.alejandra);
};
}