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 c66e984 commit c06c1d7
Showing 1 changed file with 29 additions and 16 deletions.
45 changes: 29 additions & 16 deletions pkgs/tools/system/java-service-wrapper/default.nix
Original file line number Diff line number Diff line change
@@ -1,30 +1,39 @@
{ lib
, stdenv
, fetchurl
, jdk
, ant
, cunit
, ncurses
{
lib,
stdenv,
fetchurl,
ant,
jdk,
stripJavaArchivesHook,
cunit,
ncurses,
}:

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

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-86YusgyLUveMrXepAtnABgdZCGlQDQjVFnG9GqFnCIg=";
};

strictDeps = true;

buildInputs = [ cunit ncurses ];
buildInputs = [
cunit
ncurses
];

nativeBuildInputs = [ ant jdk ];
nativeBuildInputs = [
ant
jdk
stripJavaArchivesHook
];

postConfigure = ''
postPatch = ''
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 @@ -53,14 +62,18 @@ 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" "i686-linux" "aarch64-linux" ];
platforms = [
"x86_64-linux"
"i686-linux"
"aarch64-linux"
];
maintainers = [ maintainers.suhr ];
mainProgram = "wrapper";
# Broken for Musl at 2024-01-17. Errors as:
# logger.c:81:12: fatal error: gnu/libc-version.h: No such file or directory
# Tracking issue: https://github.com/NixOS/nixpkgs/issues/281557
broken = stdenv.hostPlatform.isMusl;
};
}
})

0 comments on commit c06c1d7

Please sign in to comment.