tsm/nix/flake.nix

55 lines
1.2 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: {
2024-09-16 18:00:44 -05:00
tsm = pkgs.buildNimblePackage rec {
2024-03-18 16:56:54 -05:00
pname = "tsm";
2024-09-16 18:00:44 -05:00
version = "2024.1001-unstable";
2024-03-18 16:56:54 -05:00
src = ../.;
2024-09-23 15:16:49 -05:00
nimbleDepsHash = "sha256-8noTwYwtaPaF9iGq4EZhWMi709l9e66CJn8vm4aIyO4=";
2024-09-16 18:00:44 -05:00
nimFlags = [
"-d:TsmVersion=v${version}"
];
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
}