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
4 changes: 3 additions & 1 deletion .rashin-reviewer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ tools:

rules:
allow:
# Wallpapers, fonts and the prebuilt shell installer are large on purpose.
# Wallpapers, fonts, the prebuilt shell installer and vendored upstream
# source bundles are large on purpose.
large-file:
- "ryoku/assets/wallpapers/**"
- "**/fonts/**"
- "ryoku-shell-installer/ryoku-shell-install"
- "release/packages/*/*.bundle"
# The R2 retention Worker logs through console.log; wrangler tail reads it.
debug-leftover: ["release/r2-retention/**"]
8 changes: 5 additions & 3 deletions fedora/packages/rpm/fetch/ryoku-keysounds-profiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
set -euo pipefail

: "${RYOKU_FETCH_TREE:?}"
commit=326252a13e7bef4f1c35d08ef0189b5af6f8ba02
dest="$RYOKU_FETCH_TREE/.rpm-ryoku-keysounds-profiles/mechvibes"
package=ryoku-keysounds-profiles
bundle="$RYOKU_FETCH_TREE/release/packages/$package/mechvibes.bundle"
commit=8d18b40792c7ce859a898ce0e840a0c01112888c
dest="$RYOKU_FETCH_TREE/.rpm-$package/mechvibes"
rm -rf "$dest"
mkdir -p "${dest%/*}"
git clone -q https://github.com/hainguyents13/mechvibes.git "$dest"
git clone -q "$bundle" "$dest"
git -C "$dest" checkout -q --detach "$commit"
[[ $(git -C "$dest" rev-parse HEAD) == "$commit" ]]
printf '%s\n' "$commit" > "$dest/.ryoku-source-commit"
Expand Down
20 changes: 10 additions & 10 deletions nix/packages/ryoku-keysounds.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
}:

let
mechvibesSrc = pkgs.fetchFromGitHub {
owner = "hainguyents13";
repo = "mechvibes";

rev = "326252a13e7bef4f1c35d08ef0189b5af6f8ba02";

# Exact source used by Ryoku 0.59.7 for the shipped switch
# recording profiles.
hash = "sha256-+pEyeTzOLQXwGltFuRGGzTl0jFz8Jwbj2/u8Yiu6nmE=";
};
# The eleven Mechvibes packs the shipped profiles use, vendored as a git
# bundle beside the Arch recipe (upstream rewrote its history for Mechvibes 3
# and the pinned commit is gone), unpacked here without touching the network.
mechvibesSrc = pkgs.runCommand "mechvibes-src" {
nativeBuildInputs = [ pkgs.git ];
} ''
git clone -q ${src}/release/packages/ryoku-keysounds-profiles/mechvibes.bundle $out
git -C $out checkout -q 8d18b40792c7ce859a898ce0e840a0c01112888c
rm -rf $out/.git
'';
in

pkgs.hyprlandPlugins.mkHyprlandPlugin {
Expand Down
5 changes: 5 additions & 0 deletions release/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Release / Packaging Changelog

## Unreleased
- **The key-sound profiles build from a vendored Mechvibes bundle.** Upstream
rewrote its history for Mechvibes 3 and the pinned commit vanished, which
failed every publish at `ryoku-keysounds-profiles`. The eleven packs and
their licence now ship as `mechvibes.bundle` beside the recipe, used by the
Arch, Fedora, Void and Nix builds and the plugin Makefile.
- **The desktop package carries the Zsh startup template.** Fresh installers and
Doctor can seed it without relying on CachyOS skeleton files or replacing a
user's `.zshrc`.
Expand Down
23 changes: 16 additions & 7 deletions release/packages/ryoku-keysounds-profiles/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,30 @@
# /usr/bin/ryoku-keysounds-import no matter which, or both, are installed.
#
# The profiles are real switch recordings cut from the MIT-licensed Mechvibes
# packs (github.com/hainguyents13/mechvibes, src/audio), fetched here as a
# pinned git source and sliced by ryoku-keysounds-import (see
# ryoku/keysounds/profiles.txt for the pack behind each profile).
# packs (github.com/hainguyents13/mechvibes, src/audio) and sliced by
# ryoku-keysounds-import (see ryoku/keysounds/profiles.txt for the pack behind
# each profile). The packs come from mechvibes.bundle beside this recipe: a
# git bundle of the eleven packs and licence at upstream commit 326252a1,
# which upstream's Mechvibes 3 history rewrite made unreachable. Refresh it
# with payload.sh's bundle notes and update sha256sums.
pkgname=ryoku-keysounds-profiles
pkgver=${RYOKU_PKGVER:-0.1.0}
pkgrel=1
pkgdesc="Key-sound sample profiles (real switch recordings) and the Mechvibes importer"
arch=('x86_64')
url="https://ryoku.dev"
license=('GPL-3.0-or-later' 'MIT')
# python runs the importer, ffmpeg cuts and normalises each sample, git fetches
# the pinned Mechvibes tree.
# python runs the importer, ffmpeg cuts and normalises each sample, git opens
# the vendored Mechvibes bundle.
makedepends=('git' 'python' 'ffmpeg')
source=("mechvibes::git+https://github.com/hainguyents13/mechvibes.git#commit=326252a13e7bef4f1c35d08ef0189b5af6f8ba02")
sha256sums=('SKIP')
source=("mechvibes.bundle")
noextract=("mechvibes.bundle")
sha256sums=('5ec21776bc0989cb3a4bbcdf88084bf7d1caa9a2a9e1dd7084ad76f1e8095e32')

prepare() {
git clone -q "$srcdir/mechvibes.bundle" "$srcdir/mechvibes"
git -C "$srcdir/mechvibes" checkout -q 8d18b40792c7ce859a898ce0e840a0c01112888c
}

_repo="$startdir/../../.."

Expand Down
Binary file not shown.
18 changes: 12 additions & 6 deletions release/packages/ryoku-keysounds-profiles/payload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,15 @@ set -euo pipefail
_repo=$RYOKU_SRC
_keysounds="$_repo/ryoku/keysounds"

MECHVIBES_URL=https://github.com/hainguyents13/mechvibes.git
MECHVIBES_COMMIT=326252a13e7bef4f1c35d08ef0189b5af6f8ba02
# mechvibes.bundle holds the eleven packs profiles.txt names plus the MIT
# licence, as one commit cut from upstream 326252a13e7bef4f1c35d08ef0189b5af6f8ba02
# (src/audio). Upstream rewrote its history for Mechvibes 3 on 2026-10-31 and
# that commit no longer exists there, so every lane builds from the bundle. To
# refresh: copy the packs and LICENSE into a fresh repo, commit, then
# `git bundle create mechvibes.bundle main` and update the commit and the
# PKGBUILD sha256sums.
MECHVIBES_BUNDLE="$_repo/release/packages/ryoku-keysounds-profiles/mechvibes.bundle"
MECHVIBES_COMMIT=8d18b40792c7ce859a898ce0e840a0c01112888c

stage_prebuilt() {
[[ -n ${RYOKU_PREBUILT_DIR:-} ]] || return 1
Expand All @@ -20,13 +27,12 @@ stage_prebuilt() {
# The real switch recordings, cut from the MIT-licensed Mechvibes packs named in
# profiles.txt by ryoku-keysounds-import. The recipe is the [ryoku] build's, and
# Void's and Fedora's too, so it lives here once. MECHVIBES names a checkout;
# unset, one is cloned at the pinned commit (Arch hands in its makepkg source).
# unset, one is cloned from the vendored bundle (Arch hands in its makepkg source).
sounds() {
local mech=${MECHVIBES:-$RYOKU_BUILD_DIR/mechvibes}
if [[ ! -d $mech/src/audio ]]; then
git init -q "$mech"
git -C "$mech" fetch -q --depth 1 "$MECHVIBES_URL" "$MECHVIBES_COMMIT"
git -C "$mech" checkout -q FETCH_HEAD
git clone -q "$MECHVIBES_BUNDLE" "$mech"
git -C "$mech" checkout -q "$MECHVIBES_COMMIT"
fi
rm -rf "$RYOKU_BUILD_DIR/sounds"
local name pack
Expand Down
11 changes: 6 additions & 5 deletions ryoku/hyprland/plugins/keysounds/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ endif
CXXFLAGS ?= -O2
CXXFLAGS += -shared -fPIC -std=c++2b -Wall

MECHVIBES_URL = https://github.com/hainguyents13/mechvibes.git
MECHVIBES_COMMIT = 326252a13e7bef4f1c35d08ef0189b5af6f8ba02
# The packs come from the vendored bundle beside the profiles package (see
# release/packages/ryoku-keysounds-profiles/payload.sh for why).
MECHVIBES_BUNDLE = $(CURDIR)/../../../../release/packages/ryoku-keysounds-profiles/mechvibes.bundle
MECHVIBES_COMMIT = 8d18b40792c7ce859a898ce0e840a0c01112888c
MECHVIBES ?= $(or $(XDG_CACHE_HOME),$(HOME)/.cache)/ryoku/mechvibes
PROFILES ?= $(CURDIR)/../../../keysounds/profiles.txt
IMPORTER ?= $(shell command -v ryoku-keysounds-import 2>/dev/null || echo $(CURDIR)/../../../keysounds/ryoku-keysounds-import)
Expand All @@ -29,9 +31,8 @@ keysounds.so: main.cpp
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(EXTRA_FLAGS) main.cpp -o keysounds.so `pkg-config --cflags --libs hyprland pixman-1 libdrm libcanberra`

$(MECHVIBES)/src/audio:
git init -q "$(MECHVIBES)"
git -C "$(MECHVIBES)" fetch -q --depth 1 "$(MECHVIBES_URL)" "$(MECHVIBES_COMMIT)"
git -C "$(MECHVIBES)" checkout -q FETCH_HEAD
git clone -q "$(MECHVIBES_BUNDLE)" "$(MECHVIBES)"
git -C "$(MECHVIBES)" checkout -q "$(MECHVIBES_COMMIT)"

sounds: $(PROFILES) $(MECHVIBES)/src/audio
rm -rf sounds
Expand Down
Loading