hyprman/flake.nix

55 lines
1.3 KiB
Nix
Raw Normal View History

2024-10-01 15:42:36 -05:00
{
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;
2025-02-19 18:05:34 -06:00
systems = [
2024-10-01 15:42:36 -05:00
"x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
];
2025-02-19 18:05:34 -06:00
forSystem =
f: system:
f (
import nixpkgs {
inherit system;
overlays = [ nim2nix.overlays.default ];
}
2024-10-01 15:42:36 -05:00
);
2025-02-19 18:05:34 -06:00
forAllSystems = f: genAttrs systems (forSystem f);
2024-10-01 15:42:36 -05:00
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";
2024-11-07 16:47:04 -06:00
version = "unstable";
2024-10-01 15:42:36 -05:00
src = cleanSource ./.;
2025-02-19 18:05:34 -06:00
nimbleDepsHash = "sha256-s1uyhpie+tqUmrlCTV6alGmJhY6roGNU8l2W7CpWQqA=";
2024-10-01 15:42:36 -05:00
};
});
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
};
}