Something went wrong. Try again.
very fast at protocol indexer with flexible filtering, xrpc queries, cursor-backed event stream, and more, built on fjall
rust fjall at-protocol atproto indexer
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081{ inputs.parts.url = "github:hercules-ci/flake-parts"; inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; inputs.nci.url = "github:90-008/nix-cargo-integration";
outputs = inp: inp.parts.lib.mkFlake { inputs = inp; } { systems = [ "x86_64-linux" "aarch64-darwin" ]; imports = [inp.nci.flakeModule]; perSystem = { pkgs, config, system, ... }: let # the docs site lives in site/ and reads docs/ in place. it builds with bun in the # repo rather than in the nix store, since that would need its node deps pinned. buildDocs = pkgs.writeShellApplication { name = "build-docs"; runtimeInputs = [ pkgs.bun pkgs.nodejs pkgs.git ]; text = '' root="$(git rev-parse --show-toplevel 2>/dev/null || pwd)" cd "$root/site" bun install --frozen-lockfile bun run build if [ -n "''${1:-}" ]; then rm -rf "$1" cp -r dist "$1" fi ''; }; deployDocs = pkgs.writeShellApplication { name = "deploy-docs"; runtimeInputs = [ buildDocs pkgs.bun pkgs.git ]; text = '' build-docs root="$(git rev-parse --show-toplevel 2>/dev/null || pwd)" bunx wispctl -y --path "$root/site/dist" --site hydrant-docs did:plc:dfl62fgb7wtjj3fcbb72naae ''; }; in { nci.projects."hydrant" = { path = ./.; export = false; }; packages.default = pkgs.callPackage ./default.nix {}; # the C api for embedding, as lib/libhydrant_ffi.a and include/hydrant.h packages.ffi = config.packages.default.overrideAttrs { pname = "hydrant-ffi"; cargoBuildFlags = [ "-p" "hydrant-ffi" ]; postInstall = "install -Dm644 ffi/include/hydrant.h -t $out/include"; }; apps.build-docs = { type = "app"; program = "${buildDocs}/bin/build-docs"; }; apps.deploy-docs = { type = "app"; program = "${deployDocs}/bin/deploy-docs"; }; devShells.default = config.nci.outputs."hydrant".devShell.overrideAttrs (old: { packages = (old.packages or []) ++ (with pkgs; [ cargo-outdated gemini-cli go cmake websocat http-nu nushell clang rtk bun nodejs ] ++ lib.optionals (system == "x86_64-linux") [ psmisc wild ]); }); }; };}