Skip to content

Commit ad03a33

Browse files
committed
Document the Nix and Docker usage
1 parent 6272f07 commit ad03a33

2 files changed

Lines changed: 42 additions & 4 deletions

File tree

INSTALL.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,14 @@ The following hints apply for most Linux users:
3030
> It is best to install required software (e.g., Docker, Maven) using your distro's package manager if it is available.
3131
3232
### Setup
33-
Simply build the image using the provided script:
33+
Clone and navigate to this repository.
34+
Then, simply build the image using the provided script:
3435
```shell
35-
./docker.sh build
36+
./docker.sh build
3637
```
3738

39+
This will automatically build the Docker container using Nix if Nix is installed on your system.
40+
3841
### Execution
3942
Once the image has been build, you can start the demo with
4043
```shell
@@ -43,6 +46,37 @@ Once the image has been build, you can start the demo with
4346

4447
## Nix Setup
4548

49+
Nix can be used to reproducibly build both, a standalone derivation and a docker container.
50+
Nix aids in reproducible builds whereas Docker aids in reproducible execution.
51+
52+
To use Nix, you need to have [Nix](https://nixos.org/download/) installed on your system.
53+
See [REQUIREMENTS.md](REQUIREMENTS.md) for instructions on how to install Nix and optionally also Docker.
54+
55+
### Standalone Build
56+
57+
If you have flake's enabled, you can just use
58+
```shell
59+
nix run https://github.com/VariantSync/DiffDetective-Demo.git#.
60+
```
61+
62+
Otherwise, clone and navigate to this repository.
63+
Then simply build and run the Demo using
64+
```shell
65+
nix-build
66+
./result/bin/DiffDetective-Demo
67+
```
68+
69+
### Using a Docker Image
70+
71+
If you have Nix installed, the `docker.sh` script will automatically build this demo using Nix.
72+
Hence, the instructions are the same as for docker:
73+
Clone and navigate to this repository and execute the following:
74+
```shell
75+
./docker.sh build
76+
./docker.sh demo
77+
```
78+
79+
4680
## Expected Output
4781

4882
The expected output is close to the output shown at the end of the [screencast](https://www.youtube.com/watch?v=q6ight5EDQY).

REQUIREMENTS.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ None
88
99
We do not require a certain operating system or prepared environment.
1010
For downloading this demo, we recommend Git (installing Git is explained in [this article](https://github.com/git-guides/install-git)).
11-
The setup is tested on Windows 10, WSL2, Manjaro, Ubuntu, and MacOS Monterey.
11+
The setup is tested on Windows 10, WSL2, Manjaro, Ubuntu, NixOS and MacOS Monterey.
1212

1313
### Toolchain
1414
This demo is a Maven project based on Java 17. Thus, it requires a [Java development toolkit](https://www.oracle.com/java/technologies/downloads/) of version 17 or higher, and [Maven](https://maven.apache.org/).
@@ -22,14 +22,18 @@ Installing DiffDetective follows the default maven workflow and is explained on
2222
## Virtualization: Docker or Nix
2323
For easy replication, this demo also comes with a Nix package and a Docker container, which can be used on any system supporting Nix or Docker, respectively.
2424
The Nix and Docker setup will take care of all requirements and dependencies (including DiffDetective) and will build the demo to a single runnable JAR file.
25-
_Note_: Nix and Docker are neither required by the demo nor DiffDetective! They only serve to ease the setup for you. You may use either Nix or Docker but you do not need both.
25+
_Note_: Nix and Docker are neither required by the demo nor DiffDetective! They only serve to ease the setup for you.
26+
27+
### Docker
2628

2729
How to install Docker depends on your operating system:
2830

2931
- _Windows or Mac_: You can find download and installation instructions [here](https://www.docker.com/get-started).
3032
- _Linux Distributions_: How to install Docker on your system, depends on your distribution. The chances are high that Docker is part of your distributions package database.
3133
Docker's [documentation](https://docs.docker.com/engine/install/) contains instructions for common distributions.
3234

35+
### Nix
36+
3337
How to install Nix, also depends on your operating system.
3438
Head to the [NixOS website](https://nixos.org/download/) and follow the installation instructions for your system.
3539
Follow the download instructions for `Nix: the package manager`, not `NixOS: the Linux distribution`!

0 commit comments

Comments
 (0)