{
description = "Hanzi Sort CLI Tool with Sparse Checkout";
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = inputs@{ flake-parts, nixpkgs, flake-utils, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [ ];
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
perSystem = { pkgs, system, ... }: {
devShells.default = pkgs.mkShell {
name = "hanzi-sort-dev";
buildInputs = [
pkgs.rustup # or pkgs.rustc + pkgs.cargo if you prefer static
pkgs.cargo
pkgs.git
pkgs.just
pkgs.bash
pkgs.curl
pkgs.python314
pkgs.python314Packages.pypinyin
];
shellHook = ''
echo "[*] Welcome to the hanzi-sort dev shell."
export RUST_BACKTRACE=1
'';
};
packages.default = pkgs.rustPlatform.buildRustPackage {
pname = "hanzi-sort";
version = "0.1.0";
src = ./.;
cargoLock = {
lockFile = ./Cargo.lock;
};
};
};
flake = { };
};
}