mirror of
https://github.com/daylinmorgan/tsm.git
synced 2024-11-16 09:18:32 -06:00
51 lines
1.1 KiB
Nix
51 lines
1.1 KiB
Nix
{
|
|
description = "tsm";
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
nim2nix.url = "github:daylinmorgan/nim2nix";
|
|
};
|
|
|
|
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 {
|
|
pname = "tsm";
|
|
version = "2024.1001";
|
|
src = ../.;
|
|
nimbleDepsHash = "sha256-1J0Wt/XjFiSN1MTfgg9tE5dY3GnXH/UgG3zCL19GgpU=";
|
|
};
|
|
default = self.packages.${pkgs.system}.tsm;
|
|
});
|
|
};
|
|
}
|