Skip to content

Commit 4d74447

Browse files
ibbempmbittner
authored andcommitted
Add instructions for using Nix
1 parent 6a6bd4f commit 4d74447

1 file changed

Lines changed: 22 additions & 2 deletions

File tree

README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,23 @@ DiffDetective is a Java Maven library. While DiffDetective depends on some custo
2020

2121
DiffDetective also comes as a **nix package** (see [default.nix](default.nix)).
2222

23-
### Setup with Maven
23+
### Cloning the repository
2424

2525
First, clone this repository and navigate inside it:
2626
```shell
2727
git clone https://github.com/VariantSync/DiffDetective
2828
cd DiffDetective
2929
```
3030

31-
Second, build DiffDetective and install it on your system so that you can access it from your own projects:
31+
### Building and installing
32+
33+
You can build and install DiffDetective using Maven such that it can be used in your own `pom.xml`. Alternatively, you can use a jar which includes all necessary dependencies. Such a jar can either be built manually using Maven or using Nix.
34+
35+
#### Building and installing with Maven
36+
37+
For building and installing Maven needs to be installed. Either provide it yourselves (e.g., using the system package manager) or, if you have Nix installed, run `nix-shell` (stable Nix) or `nix develop` (Nix Flakes) to provide all necessary build tools.
38+
39+
Next, build DiffDetective and install it on your system so that you can access it from your own projects:
3240
```shell
3341
mvn install
3442
```
@@ -48,6 +56,18 @@ You can (re-)produce this jar file by either running `mvn package` or `mvn insta
4856

4957
> Disclaimer: Setup tested with maven version 3.6.3.
5058
59+
#### Building with Nix
60+
61+
Alternatively to manual building using Maven, Nix can be used. Both a [flake.nix](flake.nix) and a [default.nix](default.nix) are provided. Hence, you can build DiffDetective using
62+
```shell
63+
nix-build # stable version
64+
# or
65+
nix build # Flake version
66+
```
67+
In case you are using Nix Flakes, you can skip cloning the repository as usual: `nix build github:VariantSync/DiffDetective#.`
68+
69+
Afterwards, the [result](result) symlink points to the [Javadoc](result/share/github-pages/docs/javadoc/index.html), the [DiffDetective jar](result/share/java/DiffDetective/DiffDetective.jar) and a simple [script](result/bin/DiffDetective) for executing a DiffDetective main class provided as argument (e.g., evaluations used in previous research).
70+
5171
## Publications
5272

5373
### Classifying Edits to Variability in Source Code (ESEC/FSE 2022)

0 commit comments

Comments
 (0)