From a3dd038adb134fab679469a0af83fcd3bdd87f55 Mon Sep 17 00:00:00 2001 From: Benjamin Moosherr Date: Tue, 7 Jan 2025 20:46:56 +0100 Subject: [PATCH] README: Document the Nix setup --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8b1e70e..e8f6458 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,18 @@ TrueDiffDetective extends [DiffDetective](https://github.com/VariantSync/DiffDetective) by the option to chose [truediff](https://gitlab.rlp.net/plmz/truediff) as diffing algorithm. It is (mainly) implemented in Scala and using sbt as build tool (like truediff), but can easily be used in Java/Maven projects as well. -## Setup +## Nix Setup +You can obtain a local maven repository with TrueDiffDetective and all necessary +dependencies by running `nix-build -A maven`. It can be used by passing +`-Dmaven.repo.local=result` to `sbt` or `mvn`. + +Alternatively, the plain TrueDiffDetective jars can be build by running +`nix-build`. The jar can be installed into your Maven cache using something like +```bash +mvn install:install-file -DgroupId=org.variantsync -DartifactId=TrueDiffDetective -Dversion=0.1.0-SNAPSHOT -Dpackaging=jar -Dfile=./result/share/java/truediffdetective_2.13-0.1.0-SNAPSHOT-javadoc.jar +``` + +## Manual Setup ### Requirements and Dependencies - Scala 2 and sbt (Scala 3 will only work with some modifications) - Java 17 and Maven (for DiffDetective) @@ -36,7 +47,7 @@ To install truediff using sbt: sbt publishM2 ``` -### Using TrueDiffDetective +## Using TrueDiffDetective To use TrueDiffDetective in a sbt project add dependency: ``` "org.variantsync" % "truediffdetective_2.13" % "0.1.0-SNAPSHOT"