2 description = "fold — one outline of notes and tasks in plain Markdown, in the terminal";
4 inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
15 forAll = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system});
19 pkgs.rustPlatform.buildRustPackage {
22 # only what the build reads, so editing SPEC.md does not rebuild
23 src = pkgs.lib.fileset.toSource {
25 fileset = pkgs.lib.fileset.unions [
31 cargoLock.lockFile = ./Cargo.lock;
32 cargoBuildFlags = [ "-p" "fold-cli" ];
33 # the test suite runs in `nix flake check` (checks.default)
36 description = "One outline of notes and tasks in plain Markdown, in the terminal";
43 packages = forAll (pkgs: rec {
48 # `nix flake check`: the whole workspace's tests
49 checks = forAll (pkgs: {
50 default = (mkFold pkgs).overrideAttrs (_: {
53 cargoTestFlags = [ "--workspace" ];
54 # the trash lives under $XDG_STATE_HOME; the sandbox has no home
56 export HOME=$(mktemp -d)
57 export XDG_STATE_HOME=$HOME/.local/state
62 devShells = forAll (pkgs: {
63 default = pkgs.mkShell {
64 inputsFrom = [ (mkFold pkgs) ];
65 packages = with pkgs; [
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list