56 lines
1.3 KiB
Nix
56 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;
|
|
supportedSystems = [
|
|
"x86_64-linux"
|
|
"x86_64-darwin"
|
|
"aarch64-linux"
|
|
"aarch64-darwin"
|
|
];
|
|
forAllSystems =
|
|
f:
|
|
genAttrs supportedSystems (
|
|
system:
|
|
f (
|
|
import nixpkgs {
|
|
inherit system;
|
|
overlays = [ nim2nix.overlays.default ];
|
|
}
|
|
)
|
|
);
|
|
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 = "${self.shortRev or "dirty"}";
|
|
src = cleanSource ./.;
|
|
nimbleDepsHash = "sha256-JSbUockdzyD8Qfn1Wl5zXCH5SbV1NkS+JdUuvISfnXk=";
|
|
};
|
|
});
|
|
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
|
|
};
|
|
}
|