Add flake.nix to enable building with Nix
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
27
flake.nix
Normal file
27
flake.nix
Normal 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;
|
||||
}
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user