Add flake.nix to enable building with Nix

Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
2025-12-27 05:02:42 +00:00
parent 26ae4e9589
commit 2d17c8cdfb
3 changed files with 115 additions and 0 deletions

27
flake.nix Normal file
View File

@@ -0,0 +1,27 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
joann-pupper-bot = pkgs.crystal.buildCrystalPackage {
pname = "joann-pupper-bot";
version = "0.1.0";
src = ./.;
lockFile = ./shard.lock;
shardsFile = ./shards.nix;
format = "shards";
buildInputs = [pkgs.sqlite];
};
in
{
packages = { inherit joann-pupper-bot; };
defaultPackage = joann-pupper-bot;
}
);
}