Skip to content

Commit

Permalink
style: ensure flake registry remains sorted
Browse files Browse the repository at this point in the history
Additionally, ensure the latest contents of `flake-registry.json` are
used when running `ci.sh`. Without `--tarball-ttl 0`, old contents can
be reused across multiple runs. This shouldn't be an issue in CI, but
it's helpful when running `ci.sh` manually, during development.
  • Loading branch information
bb010g committed Oct 29, 2023
1 parent 3f641cb commit e32f537
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 60 deletions.
6 changes: 5 additions & 1 deletion ci.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#!/usr/bin/env bash
# Test that the flake-registry.json format is valid
# Test that the flake-registry.json format is sorted & valid
set -euo pipefail

cd "$(dirname "$0")"

# Ensure current flake-registry.json file is sorted.
nix registry list --tarball-ttl 0 --flake-registry "$PWD/flake-registry.json" \
| grep -- '^global ' | LC_ALL=C sort -u -c

nix run --flake-registry "$PWD/flake-registry.json" nixpkgs#hello
118 changes: 59 additions & 59 deletions flake-registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@
"type": "github"
}
},
{
"from": {
"id": "bundlers",
"type": "indirect"
},
"to": {
"owner": "NixOS",
"repo": "bundlers",
"type": "github"
}
},
{
"from": {
"id": "cachix",
Expand Down Expand Up @@ -146,12 +157,12 @@
},
{
"from": {
"id": "hercules-ci-effects",
"id": "helix",
"type": "indirect"
},
"to": {
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"owner": "helix-editor",
"repo": "helix",
"type": "github"
}
},
Expand All @@ -166,6 +177,17 @@
"type": "github"
}
},
{
"from": {
"id": "hercules-ci-effects",
"type": "indirect"
},
"to": {
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"type": "github"
}
},
{
"from": {
"id": "home-manager",
Expand Down Expand Up @@ -199,6 +221,17 @@
"type": "github"
}
},
{
"from": {
"id": "nickel",
"type": "indirect"
},
"to": {
"owner": "tweag",
"repo": "nickel",
"type": "github"
}
},
{
"from": {
"id": "nimble",
Expand Down Expand Up @@ -232,6 +265,17 @@
"type": "github"
}
},
{
"from": {
"id": "nix-serve",
"type": "indirect"
},
"to": {
"owner": "edolstra",
"repo": "nix-serve",
"type": "github"
}
},
{
"from": {
"id": "nixops",
Expand Down Expand Up @@ -276,17 +320,6 @@
"type": "github"
}
},
{
"from": {
"id": "nur",
"type": "indirect"
},
"to": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
{
"from": {
"id": "nixpkgs",
Expand All @@ -301,12 +334,12 @@
},
{
"from": {
"id": "templates",
"id": "nur",
"type": "indirect"
},
"to": {
"owner": "NixOS",
"repo": "templates",
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
Expand All @@ -332,39 +365,6 @@
"type": "github"
}
},
{
"from": {
"id": "nix-serve",
"type": "indirect"
},
"to": {
"owner": "edolstra",
"repo": "nix-serve",
"type": "github"
}
},
{
"from": {
"id": "nickel",
"type": "indirect"
},
"to": {
"owner": "tweag",
"repo": "nickel",
"type": "github"
}
},
{
"from": {
"id": "bundlers",
"type": "indirect"
},
"to": {
"owner": "NixOS",
"repo": "bundlers",
"type": "github"
}
},
{
"from": {
"id": "pridefetch",
Expand All @@ -378,34 +378,34 @@
},
{
"from": {
"id": "systems",
"id": "sops-nix",
"type": "indirect"
},
"to": {
"owner": "nix-systems",
"repo": "default",
"owner": "Mic92",
"repo": "sops-nix",
"type": "github"
}
},
{
"from": {
"id": "helix",
"id": "systems",
"type": "indirect"
},
"to": {
"owner": "helix-editor",
"repo": "helix",
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
{
"from": {
"id": "sops-nix",
"id": "templates",
"type": "indirect"
},
"to": {
"owner": "Mic92",
"repo": "sops-nix",
"owner": "NixOS",
"repo": "templates",
"type": "github"
}
}
Expand Down

0 comments on commit e32f537

Please sign in to comment.