tsm/nix/flake.nix

52 lines
1.1 KiB
Nix
Raw Normal View History

2024-03-18 16:56:54 -05:00
{
description = "tsm";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
2024-09-05 13:17:50 -05:00
nim2nix.url = "github:daylinmorgan/nim2nix";
2024-03-18 16:56:54 -05:00
};
2024-09-05 13:17:50 -05:00
outputs =
{
self,
nixpkgs,
nim2nix,
}:
let
inherit (nixpkgs.lib) genAttrs;
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: {
tsm = pkgs.buildNimblePackage {
2024-03-18 16:56:54 -05:00
pname = "tsm";
version = "2024.1001";
src = ../.;
2024-09-05 13:17:50 -05:00
nimbleDepsHash = "sha256-1J0Wt/XjFiSN1MTfgg9tE5dY3GnXH/UgG3zCL19GgpU=";
2024-03-18 16:56:54 -05:00
};
default = self.packages.${pkgs.system}.tsm;
2024-09-05 13:17:50 -05:00
});
};
2024-03-18 16:56:54 -05:00
}