-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
52 lines (49 loc) · 1.37 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
{
inputs = {
hyprland.url = "github:hyprwm/Hyprland";
};
outputs = {
self,
hyprland,
...
}: let
inherit (hyprland.inputs) nixpkgs;
lib = nixpkgs.lib;
eachSystem = lib.genAttrs (import hyprland.inputs.systems);
pkgsFor = eachSystem (system: import nixpkgs {localSystem = system;});
hyprpm = (builtins.fromTOML (builtins.readFile ./hyprpm.toml));
in {
packages = eachSystem (system: let
pkgs = pkgsFor.${system};
in rec {
bttr_dispatchers = pkgs.stdenv.mkDerivation {
pname = "bttr_dispatchers";
version = "git";
src = ./.;
nativeBuildInputs = with pkgs; [pkg-config meson ninja gcc14];
buildInputs = with pkgs;
[
hyprland.packages.${system}.hyprland.dev
]
++ hyprland.packages.${system}.hyprland.buildInputs;
meta = with pkgs.lib; {
homepage = "https://github.com/${builtins.head hyprpm.repository.authors}/bttr_dispatchers";
description = "${hyprpm.bttr_dispatchers.description}";
platforms = platforms.linux;
};
};
});
devShells = eachSystem (system: let
pkgs = pkgsFor.${system};
in {
default = pkgs.mkShell.override {stdenv = pkgs.gcc14Stdenv;} {
shellHook = ''
meson setup build --reconfigure
cp ./build/compile_commands.json ./compile_commands.json
'';
name = "bttr_dispatchers";
inputsFrom = [self.packages.${system}.bttr_dispatchers];
};
});
};
}