Unverified Commit 268ec3b4 authored by Toma's avatar Toma Committed by GitHub
Browse files

java-service-wrapper: make deterministic, do some cleanup (#295154)

parents dfb2af50 027611ec
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -2,18 +2,19 @@
  lib,
  stdenv,
  fetchurl,
  jdk,
  ant,
  jdk,
  stripJavaArchivesHook,
  cunit,
  ncurses,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "java-service-wrapper";
  version = "3.6.0";

  src = fetchurl {
    url = "https://wrapper.tanukisoftware.com/download/${version}/wrapper_${version}_src.tar.gz";
    url = "https://wrapper.tanukisoftware.com/download/${finalAttrs.version}/wrapper_${finalAttrs.version}_src.tar.gz";
    hash = "sha256-b9H7teM3zIXvuek1UNlxlzjxPNPy82ElATAGT/Fvjgw=";
  };

@@ -27,11 +28,12 @@ stdenv.mkDerivation rec {
  nativeBuildInputs = [
    ant
    jdk
    stripJavaArchivesHook
  ];

  postConfigure = ''
    substituteInPlace default.properties \
      --replace "javac.target.version=1.4" "javac.target.version=8"
      --replace-fail "javac.target.version=1.4" "javac.target.version=8"
  '';

  buildPhase = ''
@@ -60,7 +62,7 @@ stdenv.mkDerivation rec {
  meta = with lib; {
    description = "Enables a Java Application to be run as a Windows Service or Unix Daemon";
    homepage = "https://wrapper.tanukisoftware.com/";
    changelog = "https://wrapper.tanukisoftware.com/doc/english/release-notes.html#${version}";
    changelog = "https://wrapper.tanukisoftware.com/doc/english/release-notes.html#${finalAttrs.version}";
    license = licenses.gpl2Only;
    platforms = [
      "x86_64-linux"
@@ -74,4 +76,4 @@ stdenv.mkDerivation rec {
    # Tracking issue: https://github.com/NixOS/nixpkgs/issues/281557
    broken = stdenv.hostPlatform.isMusl;
  };
}
})