hyprman/flake.nix
2024-05-31 14:46:45 -05:00

42 lines
1.1 KiB
Nix

{
description = "hyprman";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
zig2nix.url = "github:Cloudef/zig2nix";
};
outputs =
inputs@{
self,
nixpkgs,
zig2nix,
...
}:
let
inherit (nixpkgs.lib) genAttrs;
supportedSystems = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
];
forAllSystems = f: genAttrs supportedSystems (system: f nixpkgs.legacyPackages.${system});
zig-env =
system:
zig2nix.outputs.zig-env.${system} { zig = zig2nix.outputs.packages.${system}.zig.default.bin; };
in
{
devShells = forAllSystems (pkgs: {
default = (zig-env pkgs.system).mkShell { };
});
packages = forAllSystems (pkgs: {
hyprman = (zig-env pkgs.system).package {
name = "hyprman";
version = "2023.1001";
src = nixpkgs.lib.cleanSource ./.;
};
default = self.packages.${pkgs.system}.hyprman;
});
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
};
}