Compare commits

...
5 Commits
Author SHA1 Message Date
gitea-actions[bot] e6a3ec44bc chore: update flake lock 2026-09-06 07:06:00 +00:00
wymiller 427757654f chore: added update flake workflow, build workflow 2026-08-30 19:39:06 -04:00
wymiller 707867341a chore: modify license file
build / docker (push) Failing after 4m8s
2026-08-26 22:18:40 -04:00
wymiller 4afabd4956 Merge branch 'master' of ssh://scm.wyattjmiller.com:222/wymiller/caitsith
build / docker (push) Failing after 4m10s
2026-08-25 22:10:35 -04:00
wymiller 51bc0cc922 mod: added container build option, formatted flake 2026-08-25 22:09:24 -04:00
5 changed files with 190 additions and 90 deletions
@@ -0,0 +1,29 @@
name: Build (nix)
on:
workflow_run:
workflows:
- Update flake lock
types:
- completed
permissions:
contents: read
jobs:
build:
if: ${{ gitea.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
# The update workflow may have pushed a newer flake.lock commit.
ref: ${{ gitea.event.workflow_run.head_branch }}
- name: Install upstream Nix
uses: cachix/install-nix-action@v31
- name: Build flake
run: nix build
+40
View File
@@ -0,0 +1,40 @@
name: Update flake lock
on:
schedule:
# Gitea cron schedules use UTC. 07:00 UTC is 03:00 EDT.
- cron: "0 7 * * 0"
workflow_dispatch:
permissions:
contents: write
jobs:
update-flake-lock:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install upstream Nix
uses: cachix/install-nix-action@v31
- name: Update flake lock
run: nix flake update
- name: Commit and push changes
shell: bash
run: |
set -euo pipefail
if git diff --quiet -- flake.lock; then
echo "flake.lock is already up to date"
exit 0
fi
git config user.name "gitea-actions[bot]"
git config user.email "gitea-actions[bot]@noreply.localhost"
git add flake.lock
git commit -m "chore: update flake lock"
git push
View File
Generated
+13 -13
View File
@@ -2,12 +2,12 @@
"nodes": { "nodes": {
"flake-schemas": { "flake-schemas": {
"locked": { "locked": {
"lastModified": 1761577921, "lastModified": 1780327564,
"narHash": "sha256-eK3/xbUOrxp9fFlei09XNjqcdiHXxndzrTXp7jFpOk8=", "narHash": "sha256-HiRPtA0spK+Dkgbhz/1zW9glXxNVB+L4Rj2VYmdawb8=",
"rev": "47849c7625e223d36766968cc6dc23ba0e135922", "rev": "6cc9bd98891b1fc6bb2b8cb3277df8bc72799ca6",
"revCount": 107, "revCount": 149,
"type": "tarball", "type": "tarball",
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.2.0/019a4a84-544d-7c59-b26d-e334e320c932/source.tar.gz" "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.5.0/019e83cf-9af3-78b1-ac5b-70e68ad1efe1/source.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
@@ -16,12 +16,12 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1771574726, "lastModified": 1788584326,
"narHash": "sha256-D1PA3xQv/s4W3lnR9yJFSld8UOLr0a/cBWMQMXS+1Qg=", "narHash": "sha256-Fd3OB8J9JhgliQwOKcqx4M672CInxi1I5VnwsaXeSQo=",
"rev": "c217913993d6c6f6805c3b1a3bda5e639adfde6d", "rev": "6713828a351efa628b025a1adf7f43cbf8597513",
"revCount": 908154, "revCount": 1013464,
"type": "tarball", "type": "tarball",
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2511.908154%2Brev-c217913993d6c6f6805c3b1a3bda5e639adfde6d/019c7ebe-d61d-7168-89bc-a2b6e142b1cd/source.tar.gz" "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2605.1013464%2Brev-6713828a351efa628b025a1adf7f43cbf8597513/01a07539-88a8-7940-bbe9-bd2b0da40c98/source.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
@@ -42,11 +42,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1771729765, "lastModified": 1788678114,
"narHash": "sha256-HNsDSR5bhLSrIpi9bTb2uTK1qnPo1xFSBxs6YmFyprk=", "narHash": "sha256-pcqbpV4ZI79al6KAlr+WJjaEo/PYfgctRlG43D5BSJM=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "be926cb1a76e8450ab2b92121b2e88d09fa4d41c", "rev": "4748ec2f5ed4a881474ed4c98aa71a5308cdac8d",
"type": "github" "type": "github"
}, },
"original": { "original": {
+108 -77
View File
@@ -1,4 +1,3 @@
# This flake was initially generated by fh, the CLI for FlakeHub (version 0.1.18)
{ {
description = "A dice roller bot"; description = "A dice roller bot";
@@ -11,87 +10,119 @@
}; };
}; };
outputs = { outputs =
self, {
flake-schemas, self,
nixpkgs, flake-schemas,
rust-overlay, nixpkgs,
}: let rust-overlay,
overlays = [ }:
rust-overlay.overlays.default let
(final: _: { overlays = [
rustToolchain = final.rust-bin.stable.latest.default.override {extensions = ["rust-src"];}; rust-overlay.overlays.default
}) (final: _: {
]; rustToolchain = final.rust-bin.stable.latest.default.override { extensions = [ "rust-src" ]; };
})
];
supportedSystems = ["x86_64-linux" "aarch64-darwin" "aarch64-linux"]; supportedSystems = [
forEachSupportedSystem = f: "x86_64-linux"
nixpkgs.lib.genAttrs supportedSystems (system: "aarch64-darwin"
f { "aarch64-linux"
pkgs = import nixpkgs {inherit overlays system;}; ];
}); forEachSupportedSystem =
in { f:
schemas = flake-schemas.schemas; nixpkgs.lib.genAttrs supportedSystems (
system:
f {
pkgs = import nixpkgs { inherit overlays system; };
}
);
in
{
schemas = flake-schemas.schemas;
formatter = forEachSupportedSystem ({ pkgs }: pkgs.nixfmt-rfc-style);
devShells = forEachSupportedSystem (
{ pkgs }:
{
default = pkgs.mkShell {
packages = with pkgs; [
rustToolchain
cargo-bloat
cargo-edit
cargo-outdated
cargo-udeps
cargo-watch
rust-analyzer
curl
git
jq
wget
nixfmt-rfc-style
pkg-config-unwrapped
openssl.dev
];
devShells = forEachSupportedSystem ({pkgs}: { env = {
default = pkgs.mkShell { RUST_BACKTRACE = "1";
packages = with pkgs; [ RUST_SRC_PATH = "${pkgs.rustToolchain}/lib/rustlib/src/rust/library";
rustToolchain PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
cargo-bloat };
cargo-edit };
cargo-outdated }
cargo-udeps );
cargo-watch
rust-analyzer
curl
git
jq
wget
nixpkgs-fmt
pkg-config-unwrapped
openssl.dev
];
env = { packages = forEachSupportedSystem (
RUST_BACKTRACE = "1"; { pkgs }:
RUST_SRC_PATH = "${pkgs.rustToolchain}/lib/rustlib/src/rust/library"; let
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig"; pname = "caitsith";
}; version = "master";
};
});
packages = forEachSupportedSystem ({ pkgs }: { bot = pkgs.rustPlatform.buildRustPackage {
default = let inherit pname version;
pname = "caitsith"; src = self;
version = "master"; cargoLock = {
lockFile = ./Cargo.lock;
};
nativeBuildInputs = with pkgs; [
pkg-config-unwrapped
openssl.dev
];
src = pkgs.fetchFromGitea { meta = {
domain = "scm.wyattjmiller.com"; description = "A dice roller bot";
owner = "wymiller"; mainProgram = "caitsith";
repo = "caitsith"; homepage = "https://scm.wyattjmiller.com/wymiller/caitsith";
rev = "${version}"; maintainers = [ "wymillerlinux" ];
sha256 = "sha256-mPLM89hIzsqO/diVgw6m3I6GfBb/SAq4bO09PfyP8yw="; platforms = [ "x86_64-linux" ];
}; };
in pkgs.rustPlatform.buildRustPackage {
inherit pname version src;
cargoLock = { lockFile = "${src}/Cargo.lock"; };
nativeBuildInputs = with pkgs; [
pkg-config-unwrapped
openssl.dev
];
meta = { env = {
description = "A Discord/Matrix bot that deathrolls"; PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
mainProgram = "caitsith"; };
homepage = "https://scm.wyattjmiller.com/wymiller/caitsith"; };
maintainers = [ "wymillerlinux" ]; in
platforms = [ "x86_64-linux" ]; {
}; default = bot;
docker = pkgs.dockerTools.buildLayeredImage {
name = pname;
tag = "latest";
contents = [
bot
pkgs.cacert
];
env = { config = {
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig"; Entrypoint = [ "${bot}/bin/${pname}" ];
}; Env = [ "SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt" ];
}; Labels = {
}); "org.opencontainers.image.title" = pname;
}; "org.opencontainers.image.description" = "A dice roller bot";
"org.opencontainers.image.source" = "https://scm.wyattjmiller.com/wymiller/caitsith";
};
};
};
}
);
};
} }