hyprman/flake.nix
2025-02-19 18:21:16 -06:00

54 lines
1.3 KiB
Nix

{
description = "hyprman";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nim2nix.url = "github:daylinmorgan/nim2nix";
nim2nix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =
{
nim2nix,
nixpkgs,
self,
...
}:
let
inherit (nixpkgs.lib) genAttrs cleanSource;
systems = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
];
forSystem =
f: system:
f (
import nixpkgs {
inherit system;
overlays = [ nim2nix.overlays.default ];
}
);
forAllSystems = f: genAttrs systems (forSystem f);
in
{
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
nim
nimble
];
};
});
packages = forAllSystems (pkgs: {
default = self.packages.${pkgs.system}.hyprman;
hyprman = pkgs.buildNimblePackage {
pname = "hyprman";
version = "unstable";
src = cleanSource ./.;
nimbleDepsHash = "sha256-s1uyhpie+tqUmrlCTV6alGmJhY6roGNU8l2W7CpWQqA=";
};
});
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
};
}