From 52dd1edb667d2ea9a45428ce1f2b48784048bf1a Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Fri, 16 Jan 2026 21:53:32 -0500 Subject: [PATCH] added nix package build --- flake.nix | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/flake.nix b/flake.nix index a67a8aa..4ec0f26 100644 --- a/flake.nix +++ b/flake.nix @@ -61,5 +61,39 @@ }; }; }); + + packages = forEachSupportedSystem ({ pkgs }: { + default = let + pname = "caitsith"; + version = "master"; + + src = pkgs.fetchFromGitea { + domain = "scm.wyattjmiller.com"; + owner = "wymiller"; + repo = "caitsith"; + rev = "${version}"; + sha256 = "sha256-bNIzb57qPzzgwGVTjk2N59P7Rtt0MdyJY12sTAH05/s="; + }; + in pkgs.rustPlatform.buildRustPackage { + inherit pname version src; + cargoLock = { lockFile = "${src}/Cargo.lock"; }; + nativeBuildInputs = with pkgs; [ + pkg-config-unwrapped + openssl.dev + ]; + + meta = { + description = "A Discord bot that deathrolls"; + mainProgram = "caitsith"; + homepage = "https://scm.wyattjmiller.com/wymiller/caitsith"; + maintainers = [ "wymillerlinux" ]; + platforms = [ "x86_64-linux" ]; + }; + + env = { + PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig"; + }; + }; + }); }; }