65 lines
1.4 KiB
Nix
65 lines
1.4 KiB
Nix
|
|
{
|
||
|
|
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;
|
||
|
|
};
|
||
|
|
}
|