Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
doCheck ? true,
buildGitHubPages ? true,
dependenciesHash ? "sha256-LJQfV426han/+H9ejUla7JvN1LS/c9l3e7hODs4Z7Kg=",
dependenciesHash ? "sha256-OdagSk6jYCkkw/kPoOJlma9yEK7hMBcNkuxE6qt0ra8=",
}:
pkgs.stdenvNoCC.mkDerivation rec {
pname = "DiffDetective";
Expand Down Expand Up @@ -57,10 +57,22 @@ pkgs.stdenvNoCC.mkDerivation rec {
# Maven needs to download necessary dependencies which is impure because it
# requires network access. Hence, we download all dependencies as a
# fixed-output derivation. This also serves as a nice cache.
#
# We use the hash of the input files to invalidate the maven cache whenever
# the input files change. This is purely for easing maintenance. In case a
# maintainer forgets (or simply doesn't know) to change the output hash to
# force a rebuild (and obtain the new, correct hash) this usually (without
# this naming hack) result in use of a stall cash, essentially behaving like
# an unreproducable derivation where a second build results in a different
# output. By changing the name of the fixed output derivation whenever
# `mavenRepoSrc` changes, we prevent this stall cache as the resulting store
# path will never exist (except when the cache is valid).
mavenRepoSrc = pkgs.lib.sourceByRegex ./. ["^pom.xml$" "^local-maven-repo(/.*)?$"];
mavenRepoSrcName = with pkgs.lib; last (splitString "/" mavenRepoSrc.outPath);
mavenRepo = pkgs.stdenv.mkDerivation {
pname = "${pname}-mavenRepo";
pname = "${pname}-mavenRepo-${mavenRepoSrcName}";
inherit version;
src = pkgs.lib.sourceByRegex ./. ["^pom.xml$" "^local-maven-repo(/.*)?$"];
src = mavenRepoSrc;

nativeBuildInputs = [pkgs.maven];

Expand Down
8 changes: 4 additions & 4 deletions nix/sources.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"nixpkgs": {
"branch": "nixos-23.11",
"branch": "nixos-25.05",
"description": "Nix Packages collection",
"homepage": null,
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6832d0d99649db3d65a0e15fa51471537b2c56a6",
"sha256": "1ww2vrgn8xrznssbd05hdlr3d4br6wbjlqprys1al8ahxkyl5syi",
"rev": "10d7f8d34e5eb9c0f9a0485186c1ca691d2c5922",
"sha256": "16ag6ac2szq60bm17cdj5ybg46gkvffkmq6a34wpx38v28r25ghx",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/6832d0d99649db3d65a0e15fa51471537b2c56a6.tar.gz",
"url": "https://github.com/NixOS/nixpkgs/archive/10d7f8d34e5eb9c0f9a0485186c1ca691d2c5922.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}
59 changes: 40 additions & 19 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,31 @@

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>3.6.3</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.1</version>
<version>3.11.2</version>
<configuration>
<reportOutputDirectory>docs</reportOutputDirectory>
<destDir>javadoc</destDir>
Expand All @@ -34,13 +55,13 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<version>3.14.0</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M8</version>
<version>3.5.3</version>
<configuration>
<includes>
<include>**/*.java</include>
Expand All @@ -52,7 +73,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.4.2</version>
<version>3.7.1</version>
<executions>
<execution>
<phase>package</phase>
Expand All @@ -71,7 +92,7 @@
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr4-maven-plugin</artifactId>
<version>4.13.1</version>
<version>4.13.2</version>
<executions>
<execution>
<goals>
Expand Down Expand Up @@ -125,7 +146,7 @@
<!-- For Gumtree -->
<groupId>org.atteo.classindex</groupId>
<artifactId>classindex</artifactId>
<version>3.11</version>
<version>3.13</version>
<scope>test</scope>
</dependency>

Expand All @@ -138,81 +159,81 @@
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit</artifactId>
<version>6.7.0.202309050840-r</version>
<version>7.2.1.202505142326-r</version>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
<version>3.17.0</version>
</dependency>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.14.0</version>
<version>2.19.0</version>
</dependency>

<dependency>
<groupId>org.tinylog</groupId>
<artifactId>tinylog-api</artifactId>
<version>2.6.1</version>
<version>2.7.0</version>
</dependency>
<dependency>
<groupId>org.tinylog</groupId>
<artifactId>tinylog-impl</artifactId>
<version>2.6.1</version>
<version>2.7.0</version>
</dependency>

<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<version>3.14.0</version>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.9.2</version>
<version>5.13.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.9.2</version>
<version>5.13.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>1.9.2</version>
<version>1.13.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit-platform</artifactId>
<version>3.0.0-M8</version>
<version>3.5.3</version>
<scope>test</scope>
</dependency>

<!-- SLF4J API -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.5</version>
<version>2.0.17</version>
</dependency>

<!-- SLF4J Simple binding -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>2.0.5</version>
<version>2.0.17</version>
</dependency>

<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4</artifactId>
<version>4.13.1</version>
<version>4.13.2</version>
</dependency>
</dependencies>
</project>