every.channel/nix/pkgs/ec-node.nix
2026-02-17 02:26:20 -08:00

52 lines
1.1 KiB
Nix

{ lib
, rustPlatform
, stdenv
, pkg-config
, openssl
}:
let
# Keep the build input stable and small; avoid copying `target/`, `tmp/`, etc. into the Nix store.
src = lib.cleanSourceWith {
src = ../../.;
filter = path: type:
let
base = baseNameOf path;
in
# Skip typical build outputs and large scratch dirs.
!(base == "target" || base == ".git" || base == ".direnv" || base == "tmp" || base == "node_modules");
};
in
rustPlatform.buildRustPackage {
pname = "ec-node";
version = "0.0.0";
inherit src;
cargoLock = {
lockFile = ../../Cargo.lock;
outputHashes = {
# Filled iteratively when git dependencies change.
"moq-catalog-0.2.2" = "sha256-df9KXVBRiNewDJ7ZgGBja81PPnk8vC9TA0bDIG0892o=";
};
};
cargoBuildFlags = [ "-p" "ec-node" ];
nativeBuildInputs = [
pkg-config
];
buildInputs =
[
openssl
];
doCheck = false;
meta = with lib; {
description = "every.channel node runner (ingest + chunk + MoQ publish)";
mainProgram = "ec-node";
platforms = platforms.unix;
license = licenses.agpl3Only;
};
}