poppy: add python313 and uv to home/cli.nix

System python is 3.9 (macOS), too old for telegram-mcp (needs >=3.10).
Added python313 and uv via home-manager. Also staged home/pay.nix
which was untracked and blocked nix builds.
This commit is contained in:
mikl 2026-07-15 21:35:38 +03:00
parent 2aac5b7731
commit 64b4274d9b
2 changed files with 80 additions and 0 deletions

View file

@ -43,6 +43,10 @@
# x402 / MPP agentic payments CLI (Solana Foundation) # x402 / MPP agentic payments CLI (Solana Foundation)
(pkgs.callPackage ./pay.nix {}) (pkgs.callPackage ./pay.nix {})
# Python (системный 3.9 macOS — слишком старый; ставим 3.13 через nix)
python313
uv
]; ];
# TODO: global npm/pnpm packages not managed by nix for now # TODO: global npm/pnpm packages not managed by nix for now

76
home/pay.nix Normal file
View file

@ -0,0 +1,76 @@
# pay — official Solana Foundation CLI for x402 / MPP payments.
# Source: https://github.com/solana-foundation/pay (Rust, but we use upstream prebuilt binaries)
#
# Not in nixpkgs yet (fresh project). This derivation fetches the upstream
# prebuilt binary tarball per platform. Update `version` + hashes on bump.
{
stdenv,
fetchurl,
lib,
system ? builtins.currentSystem,
}:
let
version = "0.21.0";
tag = "pay-v${version}";
# platform -> (tarball name, sha256 of the tarball)
# Only fill hashes for platforms you actually target; others fall through to meta.broken.
srcInfo =
{
"aarch64-darwin" = {
name = "pay-aarch64-apple-darwin.tar.gz";
hash = "11c96191145381fea9c938969c14bbd6424bcdf51ef119374c4905fb51d0e265";
};
"x86_64-darwin" = {
name = "pay-x86_64-apple-darwin.tar.gz";
hash = lib.fakeSha256; # fill if needed
};
"aarch64-linux" = {
name = "pay-aarch64-unknown-linux-gnu.tar.gz";
hash = lib.fakeSha256; # fill if needed
};
"x86_64-linux" = {
name = "pay-x86_64-unknown-linux-gnu.tar.gz";
hash = lib.fakeSha256; # fill if needed
};
}
.${system} or (throw "pay: no prebuilt binary for system ${system}");
in
stdenv.mkDerivation {
pname = "pay";
inherit version;
src = fetchurl {
url = "https://github.com/solana-foundation/pay/releases/download/${tag}/${srcInfo.name}";
# hex sha256 (verified locally for aarch64-darwin tarball)
sha256 = srcInfo.hash;
};
sourceRoot = ".";
# tarball contains a single prebuilt `pay` binary at its root.
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
install -Dm555 pay $out/bin/pay
runHook postInstall
'';
# Upstream prebuilt; we trust the platform toolchain, no further stripping/patching needed.
dontStrip = true;
dontPatchELF = true;
meta = {
description = "Solana Foundation CLI for x402 / MPP agentic API payments";
homepage = "https://pay.sh/";
license = lib.licenses.mit;
mainProgram = "pay";
# Known-good prebuilts; add hashes above to enable more platforms.
platforms = lib.platforms.darwin ++ lib.platforms.linux;
badPlatforms = [
# explicit hashes still fakeHash -> nix will fail to build on these, which is fine
];
};
}