diff --git a/default.nix b/default.nix index 182886b9c..b1988548e 100644 --- a/default.nix +++ b/default.nix @@ -26,7 +26,7 @@ }, doCheck ? true, buildGitHubPages ? true, - dependenciesHash ? "sha256-LJQfV426han/+H9ejUla7JvN1LS/c9l3e7hODs4Z7Kg=", + dependenciesHash ? "sha256-OdagSk6jYCkkw/kPoOJlma9yEK7hMBcNkuxE6qt0ra8=", }: pkgs.stdenvNoCC.mkDerivation rec { pname = "DiffDetective"; @@ -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]; diff --git a/nix/sources.json b/nix/sources.json index 94a365575..d65a61165 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -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///archive/.tar.gz" } } diff --git a/pom.xml b/pom.xml index 6c623cad4..7a03c05fd 100644 --- a/pom.xml +++ b/pom.xml @@ -20,10 +20,31 @@ + + org.apache.maven.plugins + maven-enforcer-plugin + 3.5.0 + + + enforce-maven + + enforce + + + + + 3.6.3 + + + + + + + org.apache.maven.plugins maven-javadoc-plugin - 3.4.1 + 3.11.2 docs javadoc @@ -34,13 +55,13 @@ org.apache.maven.plugins maven-compiler-plugin - 3.10.1 + 3.14.0 org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M8 + 3.5.3 **/*.java @@ -52,7 +73,7 @@ org.apache.maven.plugins maven-assembly-plugin - 3.4.2 + 3.7.1 package @@ -71,7 +92,7 @@ org.antlr antlr4-maven-plugin - 4.13.1 + 4.13.2 @@ -125,7 +146,7 @@ org.atteo.classindex classindex - 3.11 + 3.13 test @@ -138,60 +159,60 @@ org.eclipse.jgit org.eclipse.jgit - 6.7.0.202309050840-r + 7.2.1.202505142326-r org.apache.commons commons-lang3 - 3.12.0 + 3.17.0 commons-io commons-io - 2.14.0 + 2.19.0 org.tinylog tinylog-api - 2.6.1 + 2.7.0 org.tinylog tinylog-impl - 2.6.1 + 2.7.0 org.apache.maven.plugins maven-compiler-plugin - 3.11.0 + 3.14.0 org.junit.jupiter junit-jupiter-engine - 5.9.2 + 5.13.0 test org.junit.jupiter junit-jupiter - 5.9.2 + 5.13.0 test org.junit.platform junit-platform-launcher - 1.9.2 + 1.13.0 test org.apache.maven.surefire surefire-junit-platform - 3.0.0-M8 + 3.5.3 test @@ -199,20 +220,20 @@ org.slf4j slf4j-api - 2.0.5 + 2.0.17 org.slf4j slf4j-simple - 2.0.5 + 2.0.17 org.antlr antlr4 - 4.13.1 + 4.13.2