mirror of
https://github.com/anomalyco/hex.git
synced 2026-11-28 13:02:21 +01:00
Moves rune, rune-kit and rune-theme-opencode from b77c9ac to 6f9f85e (189 commits). Text now scales with its box under a parent's scale, and compact switches draw as NSSwitch capsules (36 x 16). rune-kit deprecated ButtonSize for control_size(ControlSize), whose push-button metrics differ, and a Button's default size is now 24 pt instead of 28. IconButtons move to the matching control sizes (same metrics). Push buttons keep the old 28 pt metrics through the deprecated size, and the disabled tour Continue sets it explicitly. Golden fixtures now settle on-mount sequences before their one frame, so granted permissions show their resting Allowed instead of the first frame of the grant morph; main's goldens were already stale there. nix outputHash updated; windows stays 0.62.2 for gpu-allocator.
168 lines
3.3 KiB
Nix
168 lines
3.3 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
pkg-config,
|
|
cmake,
|
|
python3,
|
|
shaderc,
|
|
vulkan-headers,
|
|
vulkan-loader,
|
|
spirv-headers,
|
|
openblas,
|
|
glib,
|
|
alsa-lib,
|
|
alsa-plugins,
|
|
pipewire,
|
|
openssl,
|
|
libxkbcommon,
|
|
wayland,
|
|
fontconfig,
|
|
freetype,
|
|
curl,
|
|
wl-clipboard,
|
|
wtype,
|
|
wrapGAppsHook3,
|
|
autoAddDriverRunpath,
|
|
symlinkJoin,
|
|
libx11,
|
|
libxcb,
|
|
libxcursor,
|
|
libxrandr,
|
|
libxi,
|
|
mkShell,
|
|
rust-analyzer,
|
|
rustfmt,
|
|
clippy,
|
|
}:
|
|
|
|
let
|
|
buildEnv = {
|
|
OPENSSL_NO_VENDOR = "1";
|
|
BLA_VENDOR = "OpenBLAS";
|
|
};
|
|
runtimeEnv = {
|
|
LD_LIBRARY_PATH = lib.makeLibraryPath [
|
|
vulkan-loader
|
|
openblas
|
|
alsa-lib
|
|
wayland
|
|
libxkbcommon
|
|
fontconfig
|
|
];
|
|
ALSA_PLUGIN_DIR = symlinkJoin {
|
|
name = "hex-alsa-plugins";
|
|
paths = [
|
|
"${pipewire}/lib/alsa-lib"
|
|
"${alsa-plugins}/lib/alsa-lib"
|
|
];
|
|
};
|
|
};
|
|
runtimePackages = [
|
|
curl
|
|
wl-clipboard
|
|
wtype
|
|
];
|
|
in
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
pname = "hex";
|
|
version = (builtins.fromTOML (builtins.readFile ../Cargo.toml)).package.version;
|
|
|
|
src = lib.fileset.toSource {
|
|
root = ../.;
|
|
fileset = lib.fileset.unions [
|
|
../Cargo.toml
|
|
../Cargo.lock
|
|
../build.rs
|
|
../src
|
|
../tests
|
|
../native
|
|
../resources
|
|
../assets
|
|
../packaging
|
|
../macos/HexMicrophoneDriver/Info.plist
|
|
../sdk/commands/package.json
|
|
../sdk/commands/src
|
|
../sdk/commands/workspace-template
|
|
];
|
|
};
|
|
|
|
cargoLock = {
|
|
lockFile = ../Cargo.lock;
|
|
outputHashes = {
|
|
"transcribe-rs-0.3.11" = "sha256-MJJiug3LfbKsuHcL2+LJk95+j5kk/MWzb5ihdBlHLmE=";
|
|
"rune-0.0.1" = "sha256-3GOr/r4mSC9mNg1Tu/cNb/RgGhnoQNdpNKtkoj5iUrc=";
|
|
};
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
cmake
|
|
python3
|
|
shaderc
|
|
wrapGAppsHook3
|
|
autoAddDriverRunpath
|
|
];
|
|
buildInputs = [
|
|
vulkan-headers
|
|
vulkan-loader
|
|
spirv-headers
|
|
openblas
|
|
glib
|
|
alsa-lib
|
|
openssl
|
|
libxkbcommon
|
|
wayland
|
|
fontconfig
|
|
freetype
|
|
libx11
|
|
libxcb
|
|
libxcursor
|
|
libxrandr
|
|
libxi
|
|
];
|
|
|
|
# OpenCode HTTP requests run through curl, including in the tests.
|
|
nativeCheckInputs = [ curl ];
|
|
|
|
dontUseCmakeConfigure = true;
|
|
env = buildEnv;
|
|
# Desktop and installed-model tests are #[ignore]; run the remaining suite.
|
|
doCheck = true;
|
|
preCheck = ''
|
|
export HOME="$TMPDIR/hex-test-home"
|
|
mkdir -p "$HOME"
|
|
'';
|
|
|
|
postInstall = ''
|
|
mv $out/bin/voice-control $out/bin/hex
|
|
install -Dm644 ${../packaging/hex.desktop} $out/share/applications/hex.desktop
|
|
substituteInPlace $out/share/applications/hex.desktop \
|
|
--replace-fail '@HEX_BIN@' "$out/bin/hex"
|
|
'';
|
|
|
|
preFixup = ''
|
|
gappsWrapperArgs+=(
|
|
--prefix PATH : ${lib.makeBinPath runtimePackages}
|
|
--prefix LD_LIBRARY_PATH : ${runtimeEnv.LD_LIBRARY_PATH}
|
|
--set ALSA_PLUGIN_DIR ${runtimeEnv.ALSA_PLUGIN_DIR}
|
|
)
|
|
'';
|
|
|
|
passthru.devShell = mkShell {
|
|
inputsFrom = [ finalAttrs.finalPackage ];
|
|
env = buildEnv // runtimeEnv;
|
|
packages = runtimePackages ++ [
|
|
rust-analyzer
|
|
rustfmt
|
|
clippy
|
|
];
|
|
};
|
|
|
|
meta = {
|
|
description = "Local-first voice dictation (Linux beta)";
|
|
homepage = "https://github.com/anomalyco/hex";
|
|
license = lib.licenses.mit;
|
|
mainProgram = "hex";
|
|
platforms = [ "x86_64-linux" ];
|
|
};
|
|
})
|