initial commit

This commit is contained in:
Ellie 2026-04-19 22:06:01 -07:00
commit 86e4751dcc
7 changed files with 5007 additions and 0 deletions

64
flake.nix Normal file
View file

@ -0,0 +1,64 @@
{
description = "Matrix dice-rolling bot (headjack + vodozemac)";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
};
outputs =
{ nixpkgs, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in
{
packages.${system} = rec {
dicebot = pkgs.rustPlatform.buildRustPackage {
pname = "dicebot";
version = "0.1.0";
src = ./.;
cargoLock = {
lockFile = ./Cargo.lock;
};
nativeBuildInputs = with pkgs; [
pkg-config
rustPlatform.bindgenHook
];
buildInputs = with pkgs; [
openssl
sqlite
];
# One sqlite crate's build script still invokes pkg-config → openssl.
env.OPENSSL_NO_VENDOR = "1";
meta = with pkgs.lib; {
description = "Matrix dice-rolling bot";
license = licenses.agpl3Plus;
mainProgram = "dicebot";
platforms = platforms.linux;
};
};
default = dicebot;
};
devShells.${system}.default = pkgs.mkShell {
packages = with pkgs; [
cargo
rustc
rustfmt
clippy
pkg-config
openssl
sqlite
];
};
formatter.${system} = pkgs.nixfmt-tree;
};
}