depot/third_party/nixpkgs/pkgs/by-name/da/databricks-cli/package.nix
Luke Granger-Brown f92e137cfb
Some checks failed
/ combine-systems (push) Blocked by required conditions
/ build (x86_64-linux) (push) Failing after 11m44s
/ build (aarch64-linux) (push) Failing after 11m50s
/ build (push) Failing after 16m42s
Merge commit '1e2ed035f4bebc9adad02b365508ad96f7df87c1' into HEAD
2025-03-02 02:23:32 +00:00

63 lines
1.4 KiB
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
gitMinimal,
python3,
}:
buildGoModule rec {
pname = "databricks-cli";
version = "0.237.0";
src = fetchFromGitHub {
owner = "databricks";
repo = "cli";
rev = "v${version}";
hash = "sha256-dGhEOghGs0Fif1/6Yfyy+aMzY+/ougl7GiPh3AikE1c=";
};
vendorHash = "sha256-GYgbZ8JdQXEOYCAxrloHccA0eS02hs9NTMRfD+hakks=";
excludedPackages = [ "bundle/internal" ];
postBuild = ''
mv "$GOPATH/bin/cli" "$GOPATH/bin/databricks"
'';
checkFlags =
"-skip="
+ (lib.concatStringsSep "|" [
# Need network
"TestConsistentDatabricksSdkVersion"
"TestTerraformArchiveChecksums"
"TestExpandPipelineGlobPaths"
"TestRelativePathTranslationDefault"
"TestRelativePathTranslationOverride"
]);
nativeCheckInputs = [
gitMinimal
(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 ];
};
}