Something went wrong. Try again.
Charm-like tui library
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596{ description = "HEX - a collection of terminal libraries";
inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; };
outputs = { self, nixpkgs }: let systems = [ "x86_64-linux" "aarch64-linux" ]; forAllSystems = nixpkgs.lib.genAttrs systems;
# Source tree minus local-only dirs. Invoke flake commands with a # `path:` ref (`nix flake check path:.`): nix's git fetcher cannot # read this repo's sha256 object format. src = pkgs: pkgs.lib.cleanSourceWith { src = ./.; filter = name: _: let base = baseNameOf name; in !(builtins.elem base [ ".git" ".jj" ".zig-cache" "zig-out" "zig-pkg" ]); };
zigCacheDirs = '' export ZIG_GLOBAL_CACHE_DIR="$TMPDIR/zig-global" export ZIG_LOCAL_CACHE_DIR="$TMPDIR/zig-local" ''; in { packages = forAllSystems (system: let pkgs = nixpkgs.legacyPackages.${system}; in { default = pkgs.stdenv.mkDerivation { pname = "hex"; version = "0.0.0"; src = src pkgs; meta.mainProgram = "hex";
nativeBuildInputs = [ pkgs.zig ];
dontConfigure = true; dontInstall = true;
buildPhase = '' runHook preBuild ${zigCacheDirs} zig build --prefix "$out" runHook postBuild ''; }; });
# `nix flake check` — unit tests plus a smoke run of the exe (prints # the help text and exits 0). checks = forAllSystems (system: let pkgs = nixpkgs.legacyPackages.${system}; in { default = pkgs.stdenv.mkDerivation { pname = "hex-check"; version = "0.0.0"; src = src pkgs;
nativeBuildInputs = [ pkgs.zig ];
dontConfigure = true; dontInstall = true;
buildPhase = '' runHook preBuild ${zigCacheDirs} zig build test --summary all zig build run touch "$out" runHook postBuild ''; }; });
devShells = forAllSystems (system: let pkgs = nixpkgs.legacyPackages.${system}; in { default = pkgs.mkShell { name = "hex"; shellHook = '' export name=hex ''; packages = [ pkgs.zig pkgs.pkg-config pkgs.libssh ]; }; }); };}