From 0e5b3663c4f50af22909c91ab82be7a1971d7314 Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Thu, 4 Jan 2024 19:13:18 +0100 Subject: [PATCH] hydraAntLogger: make deterministic and clean up --- .../java/hydra-ant-logger/default.nix | 29 +++++++++++++++---- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/java/hydra-ant-logger/default.nix b/pkgs/development/libraries/java/hydra-ant-logger/default.nix index 4b18cd7cfadc..96b6cd05ed1a 100644 --- a/pkgs/development/libraries/java/hydra-ant-logger/default.nix +++ b/pkgs/development/libraries/java/hydra-ant-logger/default.nix @@ -1,4 +1,10 @@ -{ fetchFromGitHub, lib, stdenv, ant, jdk }: +{ lib +, stdenv +, fetchFromGitHub +, ant +, jdk +, canonicalize-jars-hook +}: stdenv.mkDerivation { pname = "hydra-ant-logger"; @@ -8,19 +14,30 @@ stdenv.mkDerivation { owner = "NixOS"; repo = "hydra-ant-logger"; rev = "dae3224f4ed42418d3492bdf5bee4f825819006f"; - sha256 = "sha256-5oQ/jZfz7izTcYR+N801HYh4lH2MF54PCMnmA4CpRwc="; + hash = "sha256-5oQ/jZfz7izTcYR+N801HYh4lH2MF54PCMnmA4CpRwc="; }; - buildInputs = [ ant jdk ]; + nativeBuildInputs = [ + ant + jdk + canonicalize-jars-hook + ]; - buildPhase = "mkdir lib; ant"; + buildPhase = '' + runHook preBuild + mkdir lib + ant + runHook postBuild + ''; installPhase = '' - mkdir -p $out/share/java - cp -v *.jar $out/share/java + runHook preBuild + install -Dm644 *.jar -t $out/share/java + runHook postBuild ''; meta = { + homepage = "https://github.com/NixOS/hydra-ant-logger"; platforms = lib.platforms.unix; }; }