10 common-updater-scripts,
17 mavenGroupIdUrl = "https://packages.atlassian.com/maven/public/com/atlassian/amps";
20 stdenv.mkDerivation rec {
21 pname = "atlassian-plugin-sdk";
25 url = "${mavenGroupIdUrl}/atlassian-plugin-sdk/${version}/atlassian-plugin-sdk-${version}.tar.gz";
26 hash = "sha256-sEAe1eif9qXvIOu8RfZ4MWngEO5yCjU74g4Crd85J3Y=";
29 nativeBuildInputs = [ makeWrapper ];
30 buildInputs = [ jdk11 ];
32 unpackPhase = "tar -xzf $src";
38 cp -r atlassian-plugin-sdk-${version}/* $out
41 for file in "$out"/bin/*; do
42 wrapProgram $file --set JAVA_HOME "${jdk11}"
49 tests.version = testers.testVersion {
50 package = atlassian-plugin-sdk;
51 command = "atlas-version";
52 version = "atlassian-plugin-sdk-${version}";
55 updateScript = writeShellScript "update-atlassian-plugin-sdk" ''
62 common-updater-scripts
66 NEW_VERSION=$(curl -s ${mavenGroupIdUrl}/atlassian-plugin-sdk/maven-metadata.xml | xq -r '.metadata.versioning.latest')
68 if [[ "${version}" = "$NEW_VERSION" ]]; then
69 echo "The new version same as the old version."
73 DOWNLOAD_URL="${mavenGroupIdUrl}/atlassian-plugin-sdk/${version}/atlassian-plugin-sdk-$NEW_VERSION.tar.gz"
74 NIX_HASH=$(nix hash to-sri sha256:$(nix-prefetch-url $DOWNLOAD_URL))
76 update-source-version "atlassian-plugin-sdk" "$NEW_VERSION" "$NIX_HASH" "$DOWNLOAD_URL"
81 description = "Atlassian Plugin SDK";
82 homepage = "https://developer.atlassian.com/server/framework/atlassian-sdk/";
83 license = licenses.asl20;
84 maintainers = with maintainers; [ pathob ];
85 platforms = platforms.linux;
86 mainProgram = "atlas-mvn";