diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | README | 21 | ||||
-rw-r--r-- | bin/dune | 16 | ||||
-rw-r--r-- | dune-project | 1 | ||||
-rw-r--r-- | flake.nix | 26 | ||||
-rw-r--r-- | stitch.opam | 7 | ||||
-rw-r--r-- | stitch.opam.template | 14 |
7 files changed, 62 insertions, 24 deletions
@@ -1,2 +1,3 @@ _build/* .direnv +result @@ -37,17 +37,21 @@ _________________ Stitch does not have any opinion about which file format you use for file capturing, use org, markdown, whatever you want. You can also - customize the grep command to speed up performance. + customize the grep command to speed up performance. It only requires + that each note is contained to one file Stitch does not come with any note capturing system built in, but instead makes it easy for you to set up your own system in with your preferred editor. There is a basic example included in the manpages. + Stitch comes as a single static binary, but uses grep, sort, cut, find + to work. + 1.1 FEATURES ~~~~~~~~~~~~ - - Single binary + - Single static binary (though it makes use of coreutils) - No need for any DB, just files - UNIXy & fast - Work with any file format, markdown, ruby markup, org etc. @@ -91,12 +95,21 @@ _________________ dune exec -- stitch --help=groff + To prepare for release, run + + dune build --profile release + + Binary will be found in ./_build/default/bin/stitch + 1.6 ROADMAP ~~~~~~~~~~~ - Support sort - - Support easy tagging + - Support tagging commands + - Support command pipign and hotkeys + - Line wrapping + - Support URL shortening. 2 KNOWN ISSUES @@ -111,6 +124,8 @@ _________________ uniform file name that we can regexp (and also tweak). I am not sure yet what's best. + - The binary file is kinda big, 5mb. I'd love to slim it down. + 3 Author ======== @@ -1,5 +1,7 @@ (executable (public_name stitch) + (package stitch) + (flags (:standard -cclib -static -cclib -no-pie)) (name main) (libraries stitch @@ -10,3 +12,17 @@ notty.unix shexp.process lambda-term)) + + +; Rule to generate a man page for stitch +(rule + (target stitch.1) + (action (with-outputs-to %{target} (run stitch --help=groff))) +) + +; Install the man page +(install + (section man) + (files stitch.1) + (package stitch) +) diff --git a/dune-project b/dune-project index b15e4b7..e1425fe 100644 --- a/dune-project +++ b/dune-project @@ -1,6 +1,7 @@ (lang dune 3.11) (name stitch) +(version efe45fe-dirty) (generate_opam_files true) @@ -33,9 +33,14 @@ ${package} = prev.${package}.overrideAttrs (_: { # Prevent the ocaml dependencies from leaking into dependent environments doNixSupport = false; - buildInputs = - [ pkgs."gmp" pkgs."libev" pkgs."openssl" pkgs."libargon2" ]; - DUNE_PROFILE = "release"; + buildInputs = [ + pkgs.glibc.static + pkgs.zlib.static + pkgs.binutils-unwrapped + pkgs.ocaml + pkgs.musl + pkgs.gcc + ]; }); }; scope' = scope.overrideScope' overlay; @@ -49,21 +54,6 @@ packages.default = main; - - defaultPackage = pkgs.stdenv.mkDerivation { - name = "stitch"; - src = ./.; - buildInputs = devPackages; - buildPhase = '' - dune build --profile release - ''; - - installPhase = '' - echo "building to $out" - cp _build/install/default/bin/stitch/ $out - ''; - }; - apps.stitch.default = { type = "app"; program = "${main}/bin/stitch"; diff --git a/stitch.opam b/stitch.opam index 18a5bde..0bf5454 100644 --- a/stitch.opam +++ b/stitch.opam @@ -1,5 +1,6 @@ # This file is generated by dune, edit dune-project instead opam-version: "2.0" +version: "efe45fe-dirty" synopsis: "A Note Composer" description: "A minimal CLI tool that allows you to compose notes together. Useful as part of a bigger system for building a PKM." @@ -18,7 +19,7 @@ depends: [ "odoc" {with-doc} ] build: [ - ["dune" "subst"] {dev} + ["dune" "subst"] {release} [ "dune" "build" @@ -27,7 +28,7 @@ build: [ "-j" jobs "@install" - "@runtest" {with-test} - "@doc" {with-doc} + "--profile" + "release" ] ] diff --git a/stitch.opam.template b/stitch.opam.template new file mode 100644 index 0000000..0244e4f --- /dev/null +++ b/stitch.opam.template @@ -0,0 +1,14 @@ +build: [ + ["dune" "subst"] {release} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + "--profile" + "release" + ] +] |