fix: gitea workflow
Some checks are pending
Update Nix Packages with nix-update / nix-update (push) Waiting to run
Some checks are pending
Update Nix Packages with nix-update / nix-update (push) Waiting to run
This commit is contained in:
@@ -59,8 +59,8 @@ jobs:
|
||||
|
||||
echo "::group::Checking for opencode updates"
|
||||
|
||||
# Get latest release from GitHub API
|
||||
LATEST_RELEASE=$(curl -s "https://api.github.com/repos/anomalyco/opencode/releases/latest" | jq -r '.tag_name')
|
||||
# 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' | sed 's/^v//')
|
||||
|
||||
# Extract current version from 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"
|
||||
|
||||
# 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
|
||||
nix flake update opencode
|
||||
|
||||
10
flake.nix
10
flake.nix
@@ -44,11 +44,17 @@
|
||||
overlays = {
|
||||
# Default overlay: adds all custom packages
|
||||
default = final: prev:
|
||||
import ./pkgs {pkgs = final; inputs = inputs;};
|
||||
import ./pkgs {
|
||||
pkgs = final;
|
||||
inputs = inputs;
|
||||
};
|
||||
|
||||
# Individual overlays for more granular control
|
||||
additions = final: prev:
|
||||
import ./pkgs {pkgs = final; inputs = inputs;};
|
||||
import ./pkgs {
|
||||
pkgs = final;
|
||||
inputs = inputs;
|
||||
};
|
||||
|
||||
modifications = final: prev:
|
||||
import ./overlays/mods {inherit prev;};
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
{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
|
||||
# We patch package.json to match the environment version to fix the build
|
||||
opencode = inputs.opencode.packages.${pkgs.system}.opencode.overrideAttrs (old: {
|
||||
postPatch = (old.postPatch or "") + ''
|
||||
substituteInPlace package.json --replace-fail "bun@1.3.5" "bun@1.3.6"
|
||||
'';
|
||||
postPatch =
|
||||
(old.postPatch or "")
|
||||
+ ''
|
||||
substituteInPlace package.json --replace-fail "bun@1.3.5" "bun@1.3.6"
|
||||
'';
|
||||
});
|
||||
in {
|
||||
# Custom packages registry
|
||||
@@ -24,5 +30,5 @@ in {
|
||||
|
||||
# Imported from flake inputs
|
||||
inherit opencode;
|
||||
opencode-desktop = inputs.opencode.packages.${pkgs.system}.desktop.override { inherit opencode; };
|
||||
opencode-desktop = inputs.opencode.packages.${pkgs.system}.desktop.override {inherit opencode;};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user