tsm/nix/flake.nix

33 lines
791 B
Nix
Raw Normal View History

2024-03-18 16:56:54 -05:00
{
description = "tsm";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
};
outputs = {
self,
nixpkgs,
}: let
inherit (nixpkgs.lib) genAttrs;
supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
forAllSystems = f: genAttrs supportedSystems (system: f nixpkgs.legacyPackages.${system});
in {
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [ nim nimble ];
};
});
packages = forAllSystems (
pkgs: {
tsm = pkgs.buildNimPackage {
pname = "tsm";
version = "2024.1001";
src = ../.;
lockFile = ./lock.json;
};
default = self.packages.${pkgs.system}.tsm;
}
);
};
}