Skip to content

Commit 268ec3b

Browse files
authored
java-service-wrapper: make deterministic, do some cleanup (#295154)
2 parents dfb2af5 + 027611e commit 268ec3b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

pkgs/by-name/ja/java-service-wrapper/package.nix

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@
22
lib,
33
stdenv,
44
fetchurl,
5-
jdk,
65
ant,
6+
jdk,
7+
stripJavaArchivesHook,
78
cunit,
89
ncurses,
910
}:
1011

11-
stdenv.mkDerivation rec {
12+
stdenv.mkDerivation (finalAttrs: {
1213
pname = "java-service-wrapper";
1314
version = "3.6.0";
1415

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

@@ -27,11 +28,12 @@ stdenv.mkDerivation rec {
2728
nativeBuildInputs = [
2829
ant
2930
jdk
31+
stripJavaArchivesHook
3032
];
3133

3234
postConfigure = ''
3335
substituteInPlace default.properties \
34-
--replace "javac.target.version=1.4" "javac.target.version=8"
36+
--replace-fail "javac.target.version=1.4" "javac.target.version=8"
3537
'';
3638

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

0 commit comments

Comments
 (0)