fix: missing dependency for flake.nix (#751)

* fix: missing dependency for flake.nix

* fix formatting

* remove bindings.ts changes

---------

Co-authored-by: Thinh Vu <phuocthinhvu@gmail.com>
Co-authored-by: CJ Pais <cj@cjpais.com>
This commit is contained in:
Phuoc Thinh Vu 2026-02-10 08:34:33 +07:00 committed by GitHub
parent 647ccab7f8
commit 14db1791d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 93 additions and 77 deletions

3
.gitignore vendored
View file

@ -34,3 +34,6 @@ recording_*
playwright-report/
test-results/
blob-report/
.direnv
.envrc

167
flake.nix
View file

@ -5,85 +5,98 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = {
self,
nixpkgs,
}: let
supportedSystems = ["x86_64-linux"];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
# Read version from Cargo.toml
cargoToml = builtins.fromTOML (builtins.readFile ./src-tauri/Cargo.toml);
version = cargoToml.package.version;
in {
packages = forAllSystems (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
# AppImage-based package
handy-appimage = let
appimage = pkgs.appimageTools.wrapType2 {
pname = "handy-appimage-unwrapped";
inherit version;
src = pkgs.fetchurl {
url = "https://github.com/cjpais/Handy/releases/download/v${version}/Handy_${version}_amd64.AppImage";
hash = "sha256-tTswFYLCPGtMbHAb2bQMsklRiRCVXLrtu4pQC8IHdqQ=";
};
extraPkgs = p:
with p; [
outputs =
{
self,
nixpkgs,
}:
let
supportedSystems = [ "x86_64-linux" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
# Read version from Cargo.toml
cargoToml = builtins.fromTOML (builtins.readFile ./src-tauri/Cargo.toml);
version = cargoToml.package.version;
in
{
packages = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
# AppImage-based package
handy-appimage =
let
appimage = pkgs.appimageTools.wrapType2 {
pname = "handy-appimage-unwrapped";
inherit version;
src = pkgs.fetchurl {
url = "https://github.com/cjpais/Handy/releases/download/v${version}/Handy_${version}_amd64.AppImage";
hash = "sha256-tTswFYLCPGtMbHAb2bQMsklRiRCVXLrtu4pQC8IHdqQ=";
};
extraPkgs =
p: with p; [
alsa-lib
];
};
in
pkgs.writeShellScriptBin "handy" ''
export WEBKIT_DISABLE_DMABUF_RENDERER=1
exec ${appimage}/bin/handy-appimage-unwrapped "$@"
'';
default = self.packages.${system}.handy-appimage;
}
);
# Development shell for building from source
devShells = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
default = pkgs.mkShell {
buildInputs = with pkgs; [
# Rust
rustc
cargo
rust-analyzer
clippy
# Frontend
nodejs
bun
# Tauri CLI
cargo-tauri
# Native deps
pkg-config
openssl
alsa-lib
libsoup_3
webkitgtk_4_1
gtk3
gtk-layer-shell
glib
libxtst
libevdev
llvmPackages.libclang
cmake
vulkan-headers
vulkan-loader
shaderc
libappindicator
];
};
in
pkgs.writeShellScriptBin "handy" ''
export WEBKIT_DISABLE_DMABUF_RENDERER=1
exec ${appimage}/bin/handy-appimage-unwrapped "$@"
'';
default = self.packages.${system}.handy-appimage;
});
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath [ pkgs.libappindicator ]}";
# Development shell for building from source
devShells = forAllSystems (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
default = pkgs.mkShell {
buildInputs = with pkgs; [
# Rust
rustc
cargo
rust-analyzer
clippy
# Frontend
nodejs
bun
# Tauri CLI
cargo-tauri
# Native deps
pkg-config
openssl
alsa-lib
libsoup_3
webkitgtk_4_1
gtk3
glib
libxtst
libevdev
llvmPackages.libclang
cmake
vulkan-headers
vulkan-loader
shaderc
libappindicator
];
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath [ pkgs.libappindicator ]}";
shellHook = ''
echo "Handy development environment"
bun install
echo "Run 'bun run tauri dev' to start"
'';
};
});
};
shellHook = ''
echo "Handy development environment"
bun install
echo "Run 'bun run tauri dev' to start"
'';
};
}
);
};
}