Unverified Commit b93376a7 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

databricks-cli: Init at 0.227.0 (#332946)

parents 51cda8e9 c8e37dbf
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -721,10 +721,9 @@ lib.mapAttrs mkLicense ({
    fullName = "ISC License";
  };

  # Proprietary binaries; free to redistribute without modification.
  databricks = {
    fullName = "Databricks Proprietary License";
    url = "https://pypi.org/project/databricks-connect";
    fullName = "Databricks License";
    url = "https://www.databricks.com/legal/db-license";
    free = false;
  };

+62 −0
Original line number Diff line number Diff line
{
  lib,
  buildGoModule,
  fetchFromGitHub,
  git,
  python3,
}:

buildGoModule rec {
  pname = "databricks-cli";
  version = "0.227.0";

  src = fetchFromGitHub {
    owner = "databricks";
    repo = "cli";
    rev = "v${version}";
    hash = "sha256-bmTPtxkVtGzjxgmXpIHus7vUUg3IKGWmlUT8iOU+dtM=";
  };

  vendorHash = "sha256-ItcGzgGIDQOnAwUA/mPy+oNjChKPTVo7QK3gsidB1xQ=";

  excludedPackages = [ "bundle/internal" ];

  postBuild = ''
    mv "$GOPATH/bin/cli" "$GOPATH/bin/databricks"
  '';

  checkFlags =
    "-skip="
    + (lib.concatStringsSep "|" [
      # Need network
      "TestTerraformArchiveChecksums"
      "TestExpandPipelineGlobPaths"
      "TestRelativePathTranslationDefault"
      "TestRelativePathTranslationOverride"
    ]);

  nativeCheckInputs = [
    git
    (python3.withPackages (
      ps: with ps; [
        setuptools
        wheel
      ]
    ))
  ];

  preCheck = ''
    # Some tested depends on git and remote url
    git init
    git remote add origin https://github.com/databricks/cli.git
  '';

  meta = with lib; {
    description = "Databricks CLI";
    mainProgram = "databricks";
    homepage = "https://github.com/databricks/cli";
    changelog = "https://github.com/databricks/cli/releases/tag/v${version}";
    license = licenses.databricks;
    maintainers = with maintainers; [ kfollesdal ];
  };
}