Unverified Commit 89432c89 authored by nixpkgs-ci[bot]'s avatar nixpkgs-ci[bot] Committed by GitHub
Browse files

Merge staging-next into staging

parents 934d11cb e9465ac1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ jobs:
      - id: prepare
        uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
        with:
          retries: 3
          retries: 10
          # The default for this includes code 422, which happens regularly for us when comparing commits:
          #   422 - Server Error: Sorry, this diff is taking too long to generate.
          # Listing all other values from here to effectively remove 422:
+6 −1
Original line number Diff line number Diff line
@@ -28,7 +28,12 @@ jobs:
      - id: prepare
        uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
        with:
          retries: 3
          retries: 10
          # The default for this includes code 422, which happens regularly for us when comparing commits:
          #   422 - Server Error: Sorry, this diff is taking too long to generate.
          # Listing all other values from here to effectively remove 422:
          #   https://github.com/octokit/plugin-retry.js/blob/9a2443746c350b3beedec35cf26e197ea318a261/src/index.ts#L14
          retry-exempt-status-codes: 400,401,403,404
          script: |
            require('./ci/github-script/prepare.js')({
              github,
+87 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchzip,
  makeBinaryWrapper,
  coreutils,
  findutils,
  jre,

  testers,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "appfire-cli";
  version = "12.1.0";

  src = fetchzip {
    url = "https://appfire.atlassian.net/wiki/download/attachments/60562669/acli-${finalAttrs.version}-distribution.zip";
    hash = "sha256-6p8i5ec8IAygACdsdzP8g5u24mQZ7Ci684xuu/kAADo=";
  };

  nativeBuildInputs = [ makeBinaryWrapper ];

  installPhase = ''
    runHook preInstall

    mkdir -p $out/share/{,doc/}appfire-cli
    cp -r acli.sh lib $out/share/appfire-cli
    cp -r README.txt license $out/share/doc/appfire-cli

    ACLI_SHELL=${finalAttrs.passthru.shellNames.${stdenv.hostPlatform.system} or "unsupport"}
    if test -f $ACLI_SHELL; then
      install -Dm755 $ACLI_SHELL $out/share/appfire-cli/$ACLI_SHELL
    fi

    substituteInPlace $out/share/appfire-cli/acli.sh \
      --replace-fail 'java $' '${lib.getExe jre} $' \
      --replace-fail '(find' '(${lib.getExe findutils}' \
      --replace-fail dirname ${lib.getExe' coreutils "dirname"} \
      --replace-fail uname ${lib.getExe' coreutils "uname"}
    makeBinaryWrapper $out/share/appfire-cli/acli.sh $out/bin/acli

    runHook postInstall
  '';

  passthru = {
    shellNames = {
      "x86_64-linux" = "bin/shell-linux-amd64";
      "aarch64-linux" = "bin/shell-linux-arm64";
      "x86_64-darwin" = "bin/shell-macos-amd64";
      "aarch64-darwin" = "bin/shell-macos-arm64";
    };
    # versionCheckHook cannot be used because appfire-cli requires $HOME to be set
    tests.version = testers.testVersion {
      package = finalAttrs.finalPackage;
      command = "acli -a getClientInfo";
    };
  };

  meta = {
    description = "Integrated family of CLIs for Atlassian, Atlassian-related, and other applications";
    longDescription = ''
      Appfire CLI (ACLI) is an integrated family of CLIs for Atlassian,
      Atlassian-related, and other applications.

      ACLI provides a consistent and reliable automation platform that allows
      users, administrators, script writers, and DevOps developers to perform
      tasks, implement business processes, or apply general automation with
      Atlassian products.

      The CLIs are built on the Atlassian remote APIs and deliver a higher
      level, client-based API that is easier to use and more powerful than
      the underlying product APIs.

      The upstream documentation describes configuring acli by placing
      {file}`acli.properties` in the same directory as {file}`acli.sh`.
      Since the /nix/store is not writable, you can instead place the file
      at {file}`$HOME/acli.properties` to achieve the same effect.
    '';
    homepage = "https://apps.appf.re/acli";
    license = lib.licenses.unfreeRedistributable;
    sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
    maintainers = with lib.maintainers; [ twey ];
    mainProgram = "acli";
    inherit (jre.meta) platforms;
  };
})
+2 −2
Original line number Diff line number Diff line
@@ -6,11 +6,11 @@
}:
let
  pname = "artisan";
  version = "3.2.0";
  version = "3.4.0";

  src = fetchurl {
    url = "https://github.com/artisan-roaster-scope/artisan/releases/download/v${version}/${pname}-linux-${version}.AppImage";
    hash = "sha256-p8M9Z0z/0unJPOLXVOnN8INO4v0D5Ojjug42xT77oqQ=";
    hash = "sha256-aAxFfghEf+MRDZBd0FD5OphOOVhz3Nt2wUOmhrwXGh4=";
  };

  appimageContents = appimageTools.extract {
+0 −54
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchzip,
  jre,
}:

stdenv.mkDerivation rec {
  pname = "atlassian-cli";
  version = "9.6.0";

  src = fetchzip {
    url = "https://bobswift.atlassian.net/wiki/download/attachments/16285777/${pname}-${version}-distribution.zip";
    sha256 = "sha256-55ydhprVC9NdDMUrKbpSAEQBb9zRYgwOc7k8aP4R89A=";
  };

  tools = [
    "agile"
    "bamboo"
    "bitbucket"
    "confluence"
    "csv"
    "hipchat"
    "jira"
    "servicedesk"
    "structure"
    "tempo"
    "trello"
    "upm"
  ];

  installPhase = ''
    mkdir -p $out/{bin,share/doc/atlassian-cli}
    cp -r lib $out/share/java
    cp -r README.txt license $out/share/doc/atlassian-cli
    for tool in $tools
    do
      substitute ${./wrapper.sh} $out/bin/$tool \
        --subst-var out \
        --subst-var-by jre ${jre} \
        --subst-var-by tool $tool
      chmod +x $out/bin/$tool
    done
  '';

  meta = with lib; {
    description = "Integrated family of CLI’s for various Atlassian applications";
    homepage = "https://bobswift.atlassian.net/wiki/spaces/ACLI/overview";
    license = licenses.unfreeRedistributable;
    sourceProvenance = with sourceTypes; [ binaryBytecode ];
    maintainers = with maintainers; [ twey ];
    inherit (jre.meta) platforms;
  };
}
Loading