From d0fd5b1a263fcfdd08c39bf12cf991b1c20a46bf Mon Sep 17 00:00:00 2001 From: Mike Landau Date: Mon, 5 Oct 2026 09:04:21 -0700 Subject: [PATCH] examples: use an in-repo flake in the remote flakes example The flakes/remote example pulled in github:F1bonacc1/process-compose, which isn't in cache.nixos.org, so every CI run built it from source on macOS, including its timing-sensitive Go test suite. That build has repeatedly failed the nightly cli-tests (process-compose 0.43.1 in early September, 1.122.0 now), even though the example's run_test never used process-compose. Point the remote flake at examples/flakes/php/my-php-flake in this repo, pinned to a main commit. Its hello output comes from a locked nixpkgs and is substituted from the binary cache, so nothing is built. run_test now also calls hello so the remote flake is exercised. Co-Authored-By: Claude Opus 5.5 (1M context) --- examples/flakes/README.md | 8 ++++---- examples/flakes/remote/devbox.json | 8 +++++--- examples/flakes/remote/devbox.lock | 12 ++++-------- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/examples/flakes/README.md b/examples/flakes/README.md index ab28e927462..ec26ff2c5e9 100644 --- a/examples/flakes/README.md +++ b/examples/flakes/README.md @@ -27,13 +27,13 @@ This installs the "php" and "hello" outputs from the flake at `my-php-flake`. Th ## Remote flakes -Use `github://#` as the package name to install from a Github repo. +Use `github://#` as the package name to install from a Github repo. If the flake lives in a subdirectory of the repo, add `?dir=` before the `#`. ```json { "packages": [ - "github:nixos/nixpkgs/5233fd2ba76a3accb5aaa999c00509a11fd0793c#hello", - "github:F1bonacc1/process-compose" + "github:nixos/nixpkgs/5233fd2ba76a3accb5aaa999c00509a11fd0793c#cowsay", + "github:jetify-com/devbox/1d9ea45e1e51826df32ef0db7035c4c00ae2c184?dir=examples/flakes/php/my-php-flake#hello" ], "shell": { "init_hook": null @@ -44,4 +44,4 @@ Use `github://#` as the package name to install from a G } ``` -This installs the `hello` package from the 5233fd... commit of Nixpkgs, and the `default` output from the `F1bonacc1/process-compose` repo. +This installs the `cowsay` package from the 5233fd... commit of Nixpkgs, and the `hello` output of the flake in the `examples/flakes/php/my-php-flake` directory of the `jetify-com/devbox` repo. diff --git a/examples/flakes/remote/devbox.json b/examples/flakes/remote/devbox.json index 2a5443582f8..80c46b55e8e 100644 --- a/examples/flakes/remote/devbox.json +++ b/examples/flakes/remote/devbox.json @@ -1,13 +1,15 @@ { "packages": [ - "github:nixos/nixpkgs/5233fd2ba76a3accb5aaa999c00509a11fd0793c#hello", "github:nixos/nixpkgs/5233fd2ba76a3accb5aaa999c00509a11fd0793c#cowsay", - "github:F1bonacc1/process-compose/v1.122.0" + "github:jetify-com/devbox/1d9ea45e1e51826df32ef0db7035c4c00ae2c184?dir=examples/flakes/php/my-php-flake#hello" ], "shell": { "init_hook": null, "scripts": { - "run_test": "cowsay -- hello" + "run_test": [ + "hello", + "cowsay -- hello" + ] } }, "nixpkgs": { diff --git a/examples/flakes/remote/devbox.lock b/examples/flakes/remote/devbox.lock index d541fc9968d..c49cafeb373 100644 --- a/examples/flakes/remote/devbox.lock +++ b/examples/flakes/remote/devbox.lock @@ -1,21 +1,17 @@ { "lockfile_version": "1", "packages": { - "github:F1bonacc1/process-compose/v1.122.0": { - "last_modified": "2026-08-17T22:53:14Z", - "resolved": "github:F1bonacc1/process-compose/673850dd20683ef14b33890444ca3416d02c751c?lastModified=1787007194&narHash=sha256-zEhXgpQdg7WRJJPvhtK9zi4U6NJCDGKWjINlZ9m6I2A%3D" - }, "github:NixOS/nixpkgs/f80ac848e3d6f0c12c52758c0f25c10c97ca3b62": { "last_modified": "1970-01-01T00:00:00Z", "resolved": "github:NixOS/nixpkgs/f80ac848e3d6f0c12c52758c0f25c10c97ca3b62" }, - "github:nixos/nixpkgs/5233fd2ba76a3accb5aaa999c00509a11fd0793c#cowsay": { + "github:jetify-com/devbox/1d9ea45e1e51826df32ef0db7035c4c00ae2c184?dir=examples/flakes/php/my-php-flake#hello": { "last_modified": "1970-01-01T00:00:00Z", - "resolved": "github:nixos/nixpkgs/5233fd2ba76a3accb5aaa999c00509a11fd0793c#cowsay" + "resolved": "github:jetify-com/devbox/1d9ea45e1e51826df32ef0db7035c4c00ae2c184?dir=examples%2Fflakes%2Fphp%2Fmy-php-flake#hello" }, - "github:nixos/nixpkgs/5233fd2ba76a3accb5aaa999c00509a11fd0793c#hello": { + "github:nixos/nixpkgs/5233fd2ba76a3accb5aaa999c00509a11fd0793c#cowsay": { "last_modified": "1970-01-01T00:00:00Z", - "resolved": "github:nixos/nixpkgs/5233fd2ba76a3accb5aaa999c00509a11fd0793c#hello" + "resolved": "github:nixos/nixpkgs/5233fd2ba76a3accb5aaa999c00509a11fd0793c#cowsay" } } }