Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions .github/workflows/auto-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
# Only packages with an upstream to track. vcrunch and zelda-oot
# are local-only (src = ./. / writeShellScriptBin) — no version
# concept beyond what Chief stamps manually.
for pkg in brush-shell brave-origin antigravity-cli proton-drive-cli; do
for pkg in brave-origin antigravity-cli proton-drive-cli; do
echo "::group::update $pkg"
def="pkgs/$pkg/default.nix"
before=$(grep -oE "version = \"[^\"]+\"" "$def" | head -n1 | sed "s/version = \"//; s/\"\$//")
Expand All @@ -62,13 +62,6 @@ jobs:
"pkgs/$pkg/update.sh"
rc=$?
tool="update.sh"
elif [[ "$pkg" == "brush-shell" ]]; then
# brush-shell tracks the upstream default branch (nightly),
# not tagged releases. --version=branch grabs the newest
# commit and stamps a "<tag>-unstable-<date>" version.
nix-update --flake "$pkg" --version=branch --build
rc=$?
tool="nix-update (branch)"
else
nix-update --flake "$pkg" --build
rc=$?
Expand Down
49 changes: 32 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,41 @@

Personal Nix package collection.

## How to Update
## Packages

### Rust Packages (brush-shell)
These use `buildRustPackage` and need a `cargoHash`.
| Package | Platforms | Auto-update |
|--------------------|-------------------------------|-------------|
| `proton-drive-cli` | linux, darwin (x64 + arm64) | `update.sh` |
| `pd` | linux, darwin | manual |
| `sparrow` | linux (x64 + arm64) | planned |
| `antigravity-cli` | linux, darwin | nix-update |
| `brave-origin` | linux | nix-update |
| `vcrunch` | linux | manual |
| `zelda-oot` | linux | manual |
| `flashgbx` | linux | manual |
| `opengigabyte` | linux | manual |

1. Update `rev` and `shortRev` (if used) to latest commit.
2. Update `hash` (source hash):
- Run: `nix shell nixpkgs#nix-prefetch-github -c nix-prefetch-github <owner> <repo> --rev <rev>`
3. Update `cargoHash`:
- Set `cargoHash = lib.fakeHash;` (or many zeros).
- Run: `nix-build -E 'with import <nixpkgs> {}; callPackage ./pkgs/<name>/default.nix {}'`
- Copy "got" hash from error message into `default.nix`.
4. Verify build: `nix-build -E 'with import <nixpkgs> {}; callPackage ./pkgs/<name>/default.nix {}'`
## Usage

### Other Packages (vcrunch, brave-origin)
Usually just need `rev` and `hash` updates.
```bash
# Try a package without installing
nix run github:izaac/nix-packages#pd

1. Update `rev`.
2. Update source `hash` using `nix-prefetch-url` or `nix-prefetch-github`.
3. Verify build same as above.
# Use as flake input
inputs.nix-packages.url = "github:izaac/nix-packages";
```

## Updating Packages

Packages with `update.sh` scripts auto-update via the weekly GitHub Actions workflow.
For others, use `nix-update`:

```bash
nix-update --flake <package> --build
```

## Verification
Always run `nix-build` before committing.

```bash
nix flake check
```
4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
linuxOnly = lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
vcrunch = pkgs.callPackage ./pkgs/vcrunch {};
zelda-oot = pkgs.callPackage ./pkgs/zelda-oot {};
brush-shell = pkgs.callPackage ./pkgs/brush-shell {};
brave-origin = pkgs.callPackage ./pkgs/brave-origin {};
flashgbx = pkgs.callPackage ./pkgs/flashgbx {};
opengigabyte = pkgs.linuxPackages_latest.callPackage ./pkgs/opengigabyte {};
sparrow = pkgs.callPackage ./pkgs/sparrow {};
};
in
linuxOnly
Expand All @@ -68,10 +68,10 @@
linuxOnly = lib.optionalAttrs final.stdenv.hostPlatform.isLinux {
izaac-vcrunch = final.callPackage ./pkgs/vcrunch {};
izaac-zelda-oot = final.callPackage ./pkgs/zelda-oot {};
izaac-brush-shell = final.callPackage ./pkgs/brush-shell {};
izaac-brave-origin = final.callPackage ./pkgs/brave-origin {};
izaac-flashgbx = final.callPackage ./pkgs/flashgbx {};
izaac-opengigabyte = final.linuxPackages_latest.callPackage ./pkgs/opengigabyte {};
izaac-sparrow = final.callPackage ./pkgs/sparrow {};
};
in
linuxOnly
Expand Down
33 changes: 0 additions & 33 deletions pkgs/brush-shell/default.nix

This file was deleted.

Loading