From 1fb1fcc4fa0c07197ccb1e64cc1030859c013688 Mon Sep 17 00:00:00 2001 From: Sven van Heugten Date: Tue, 3 Mar 2026 07:15:06 +0100 Subject: [PATCH] Add installation instructions --- README.md | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 79ff8de..f0479cd 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,41 @@ You include a small bash script inside your commit messages, and `git-check-asse ⚠️ Only run this on repositories and branches that you trust, since the `bash` scripts in the commit messages can do whatever they want. -## Building +## Installation -```bash -nix build . +On most systems, clone this repository and add the `bin` directory to your `PATH`. + +If you use Nix with flakes, you can simply add it to your program's devshell instead: + +```diff +@@ -2,12 +2,18 @@ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + flake-utils.url = "github:numtide/flake-utils"; ++ git-check-assertions = { ++ url = "git+https://codeberg.org/svenvanheugten/git-check-assertions.git?ref=main"; ++ inputs.nixpkgs.follows = "nixpkgs"; ++ inputs.flake-utils.follows = "flake-utils"; ++ }; + }; + outputs = + { + self, + nixpkgs, + flake-utils, ++ git-check-assertions, + }: + flake-utils.lib.eachDefaultSystem ( + system: +@@ -17,7 +23,10 @@ + { + packages.default = pkgs.callPackage ./default.nix { }; + devShells.default = pkgs.mkShell { +- packages = [ ]; ++ packages = [ git-check-assertions.packages.${system}.default ]; + }; + } + ) ``` ## Examples of commit messages