Skip to content

Commit

Permalink
java-service-wrapper: make deterministic, do some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
TomaSajt committed Jan 4, 2025
1 parent 90c106c commit 960c4a7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions pkgs/by-name/ja/java-service-wrapper/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.5.60";

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-h3iW4U83XAyIHDpQ+O6RC8ZQSziPu/5lEo5512PQhxc=";
};

Expand All @@ -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 = ''
Expand Down Expand Up @@ -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"
Expand All @@ -74,4 +76,4 @@ stdenv.mkDerivation rec {
# Tracking issue: https://github.com/NixOS/nixpkgs/issues/281557
broken = stdenv.hostPlatform.isMusl;
};
}
})

0 comments on commit 960c4a7

Please sign in to comment.