fix: gitea workflow
Some checks are pending
Update Nix Packages with nix-update / nix-update (push) Waiting to run

This commit is contained in:
m3tm3re
2026-01-20 20:57:31 +01:00
parent 1c7a7f0c82
commit d674b2f02b
3 changed files with 22 additions and 10 deletions

View File

@@ -59,8 +59,8 @@ jobs:
echo "::group::Checking for opencode updates" echo "::group::Checking for opencode updates"
# Get latest release from GitHub API # Get latest release from GitHub API (strip v prefix for comparison)
LATEST_RELEASE=$(curl -s "https://api.github.com/repos/anomalyco/opencode/releases/latest" | jq -r '.tag_name') LATEST_RELEASE=$(curl -s "https://api.github.com/repos/anomalyco/opencode/releases/latest" | jq -r '.tag_name' | sed 's/^v//')
# Extract current version from flake.nix # Extract current version from flake.nix
CURRENT_VERSION=$(grep -oP 'opencode\.url = "github:anomalyco/opencode/v\K[^"]+' flake.nix) CURRENT_VERSION=$(grep -oP 'opencode\.url = "github:anomalyco/opencode/v\K[^"]+' flake.nix)
@@ -73,7 +73,7 @@ jobs:
echo "🔄 Updating opencode from $CURRENT_VERSION to $LATEST_RELEASE" echo "🔄 Updating opencode from $CURRENT_VERSION to $LATEST_RELEASE"
# Update flake.nix with new version # Update flake.nix with new version
sed -i 's|opencode\.url = "github:anomalyco/opencode/v.*"|opencode.url = "github:anomalyco/opencode/'"$LATEST_VERSION"'"| flake.nix sed -i 's|opencode\.url = "github:anomalyco/opencode/v.*"|opencode.url = "github:anomalyco/opencode/v'"$LATEST_RELEASE"'"|' flake.nix
# Update flake lock to fetch new revision # Update flake lock to fetch new revision
nix flake update opencode nix flake update opencode

View File

@@ -44,11 +44,17 @@
overlays = { overlays = {
# Default overlay: adds all custom packages # Default overlay: adds all custom packages
default = final: prev: default = final: prev:
import ./pkgs {pkgs = final; inputs = inputs;}; import ./pkgs {
pkgs = final;
inputs = inputs;
};
# Individual overlays for more granular control # Individual overlays for more granular control
additions = final: prev: additions = final: prev:
import ./pkgs {pkgs = final; inputs = inputs;}; import ./pkgs {
pkgs = final;
inputs = inputs;
};
modifications = final: prev: modifications = final: prev:
import ./overlays/mods {inherit prev;}; import ./overlays/mods {inherit prev;};

View File

@@ -1,8 +1,14 @@
{pkgs, inputs ? null, ...}: let {
pkgs,
inputs ? null,
...
}: let
# Upstream opencode v1.1.27 strictly requires Bun 1.3.5 but its locked nixpkgs provides 1.3.6 # Upstream opencode v1.1.27 strictly requires Bun 1.3.5 but its locked nixpkgs provides 1.3.6
# We patch package.json to match the environment version to fix the build # We patch package.json to match the environment version to fix the build
opencode = inputs.opencode.packages.${pkgs.system}.opencode.overrideAttrs (old: { opencode = inputs.opencode.packages.${pkgs.system}.opencode.overrideAttrs (old: {
postPatch = (old.postPatch or "") + '' postPatch =
(old.postPatch or "")
+ ''
substituteInPlace package.json --replace-fail "bun@1.3.5" "bun@1.3.6" substituteInPlace package.json --replace-fail "bun@1.3.5" "bun@1.3.6"
''; '';
}); });