Initial implementation of Improvise TUI
Multi-dimensional data modeling terminal application with:
- Core data model: categories, items, groups, sparse cell store
- Formula system: recursive-descent parser, named formulas, WHERE clauses
- View system: Row/Column/Page axes, tile-based pivot, page slicing
- JSON import wizard (interactive TUI + headless auto-mode)
- Command layer: all mutations via typed Command enum for headless replay
- TUI: Ratatui grid, tile bar, formula/category/view panels, help overlay
- Persistence: .improv (JSON), .improv.gz (gzip), CSV export, autosave
- Static binary via x86_64-unknown-linux-musl + nix flake devShell
- Headless mode: --cmd '{"op":"..."}' and --script file.jsonl
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
62
flake.nix
Normal file
62
flake.nix
Normal file
@ -0,0 +1,62 @@
|
||||
{
|
||||
description = "Improvise — Multi-Dimensional Data Modeling Terminal Application";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
rust-overlay = {
|
||||
url = "github:oxalica/rust-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, rust-overlay, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
overlays = [ (import rust-overlay) ];
|
||||
pkgs = import nixpkgs { inherit system overlays; };
|
||||
|
||||
rustToolchain = pkgs.rust-bin.stable.latest.default.override {
|
||||
extensions = [ "rust-src" "clippy" "rustfmt" ];
|
||||
targets = [ "x86_64-unknown-linux-musl" ];
|
||||
};
|
||||
|
||||
muslCC = pkgs.pkgsMusl.stdenv.cc;
|
||||
in
|
||||
{
|
||||
devShells.default = pkgs.mkShell {
|
||||
nativeBuildInputs = [
|
||||
rustToolchain
|
||||
pkgs.pkg-config
|
||||
# Provide cc (gcc) for building proc-macro / build-script crates
|
||||
# that target the host (x86_64-unknown-linux-gnu).
|
||||
pkgs.gcc
|
||||
# musl-gcc wrapper for the static musl target.
|
||||
muslCC
|
||||
];
|
||||
|
||||
# Tell Cargo which linker to use for each target so it never
|
||||
# falls back to rust-lld (which can't find glibc on NixOS).
|
||||
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER =
|
||||
"${pkgs.gcc}/bin/gcc";
|
||||
CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER =
|
||||
"${muslCC}/bin/cc";
|
||||
|
||||
# Default build target: static musl binary.
|
||||
CARGO_BUILD_TARGET = "x86_64-unknown-linux-musl";
|
||||
|
||||
RUST_BACKTRACE = "1";
|
||||
};
|
||||
|
||||
packages.default =
|
||||
(pkgs.pkgsMusl.makeRustPlatform {
|
||||
cargo = rustToolchain;
|
||||
rustc = rustToolchain;
|
||||
}).buildRustPackage {
|
||||
pname = "improvise";
|
||||
version = "0.1.0";
|
||||
src = ./.;
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
};
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user