1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

Merge pull request #294597 from TomaSajt/axis2

axis2: remove legacy builder.sh, make deterministic
This commit is contained in:
Artturin 2024-07-16 18:15:38 +03:00 committed by GitHub
commit 36d1047ddd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 39 additions and 24 deletions

View file

@ -1,16 +0,0 @@
if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
source $stdenv/setup
unzip $src
cd axis2-*
mkdir -p $out
cp -av * $out
cd webapp
ant
cd ..
mkdir -p $out/webapps
cp dist/axis2.war $out/webapps
cd $out/webapps
mkdir axis2
cd axis2
unzip ../axis2.war

View file

@ -1,25 +1,56 @@
{ lib, stdenvNoCC, fetchurl, apacheAnt, jdk, unzip }:
{
lib,
stdenvNoCC,
fetchurl,
ant,
jdk,
stripJavaArchivesHook,
unzip,
nixosTests,
}:
stdenvNoCC.mkDerivation rec {
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "axis2";
version = "1.8.2";
src = fetchurl {
url = "mirror://apache/axis/axis2/java/core/${version}/${pname}-${version}-bin.zip";
url = "mirror://apache/axis/axis2/java/core/${finalAttrs.version}/axis2-${finalAttrs.version}-bin.zip";
hash = "sha256-oilPVFFpl3F61nVDxcYx/bc81FopS5fzoIdXzeP8brk=";
};
nativeBuildInputs = [ unzip ];
buildInputs = [ apacheAnt jdk ];
builder = ./builder.sh;
nativeBuildInputs = [
ant
jdk
stripJavaArchivesHook
unzip
];
buildPhase = ''
runHook preBuild
ant -f webapp
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm644 dist/axis2.war -t $out/webapps
unzip $out/webapps/axis2.war -d $out/webapps/axis2
runHook postInstall
'';
passthru.tests = {
inherit (nixosTests) tomcat;
};
meta = {
description = "Web Services / SOAP / WSDL engine, the successor to the widely used Apache Axis SOAP stack";
homepage = "https://axis.apache.org/axis2/java/core/";
changelog = "https://axis.apache.org/axis2/java/core/release-notes/${version}.html";
changelog = "https://axis.apache.org/axis2/java/core/release-notes/${finalAttrs.version}.html";
maintainers = [ lib.maintainers.anthonyroussel ];
platforms = lib.platforms.unix;
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = lib.licenses.asl20;
};
}
})