pkgs/microcosm/default.nix
default.nix
46 lines 1.0 kB view raw
1# SPDX-FileCopyrightText: 2026 atproto-nix.org 2# SPDX-License-Identifier: CC0-1.0 OR Unlicense 3{ 4 lib, 5 fetchFromGitHub, 6 rustPlatform, 7 pkg-config, 8 openssl, 9 zstd, 10 stdenv, 11}: 12let 13 pname = "microcosm"; 14 version = "v0.0.2"; 15 src = fetchFromGitHub { 16 owner = "at-microcosm"; 17 repo = "microcosm-rs"; 18 rev = "refs/tags/reflector-v0.0.2"; 19 hash = "sha256-GcOV2/LhxQ7Du+Yr9CZIAKiYVBgS90u0/sAxoPHIpWc="; 20 }; 21 meta = { 22 description = "A collection of Rust crates and services for ATProto"; 23 homepage = "https://microcosm.blue"; 24 license = with lib.licenses; [ agpl3Only ]; 25 maintainers = [ 26 { 27 name = "atproto-nix"; 28 email = "contact@atproto-nix.org"; 29 } 30 ]; 31 }; 32in 33rustPlatform.buildRustPackage { 34 inherit pname version src meta; 35 cargoHash = "sha256-SmQA25fGk64g8wH65dReZbtlH/O3xbAOBGvSTny9Amc="; 36 nativeBuildInputs = [ 37 pkg-config 38 stdenv.cc 39 ]; 40 buildInputs = [ 41 openssl 42 zstd 43 ]; 44 ZSTD_SYS_USE_PKG_CONFIG = true; 45 LIBCLANG_PATH = "${stdenv.cc.cc.lib}/lib"; 46}