e3e8c6f5e3
ci/woodpecker/push/woodpecker Pipeline failed
- packages/xontribs.nix: xontrib-prompt-starship, -broot, -term-integrations wheels for use with `programs.xonsh.extraPackages` (or xonsh.override) - packages/hyprspace.nix + hyprspace flake input (flake=false): rebuild plugin against the consumer's hyprland; exposed via overlays.hyprspace - overlays/gcc15-fixes.nix: hotdoc/kitty/libsecret/xdg-desktop-portal/afdko workarounds so fleet nodes on the same pin can opt in with one line - flake.nix: lift overlays out of eachSystem to the root (overlays.default was previously nested per-system, which doesn't match flake schema)
56 lines
1.4 KiB
Python
56 lines
1.4 KiB
Python
#!/usr/bin/env python3
|
|
"""Build all flake-hub packages and push to attic."""
|
|
|
|
import os
|
|
import subprocess
|
|
import sys
|
|
|
|
|
|
def run(cmd):
|
|
print(f"+ {cmd}", flush=True)
|
|
r = subprocess.run(cmd, shell=True)
|
|
if r.returncode != 0:
|
|
sys.exit(r.returncode)
|
|
|
|
|
|
def capture(cmd):
|
|
r = subprocess.run(cmd, shell=True, capture_output=True, text=True)
|
|
if r.returncode != 0:
|
|
print(r.stderr, file=sys.stderr)
|
|
sys.exit(r.returncode)
|
|
return r.stdout.strip()
|
|
|
|
|
|
ARCH = sys.argv[1]
|
|
ATTIC_CACHE = "attic-infra-cache-k3s-1"
|
|
ATTIC_SERVER = "https://nix-cache-upload.oleks.space"
|
|
ATTIC_TOKEN = os.environ["ATTIC_TOKEN"]
|
|
|
|
print(f"=== Building flake-hub packages for {ARCH} ===")
|
|
|
|
# Setup attic
|
|
attic = (
|
|
capture(
|
|
"nix build --inputs-from . nixpkgs#attic-client --print-out-paths --no-link"
|
|
)
|
|
+ "/bin/attic"
|
|
)
|
|
run(f"'{attic}' login ci {ATTIC_SERVER} '{ATTIC_TOKEN}'")
|
|
|
|
# Packages per arch
|
|
packages = ["hello-world", "geesefs", "xonsh"]
|
|
if ARCH == "x86_64-linux":
|
|
packages += ["google-antigravity", "google-antigravity-no-fhs"]
|
|
if ARCH == "s390x-linux":
|
|
packages += ["attic-client"]
|
|
|
|
print("Building packages...")
|
|
for pkg in packages:
|
|
print(f"--- {pkg} ---")
|
|
out = capture(
|
|
f"nix build '.#packages.{ARCH}.{pkg}' --print-build-logs --print-out-paths --no-link"
|
|
)
|
|
run(f"'{attic}' push {ATTIC_CACHE} {out}")
|
|
|
|
print(f"Build completed for {ARCH}")
|