Skip to content

Commit 695737a

Browse files
committed
Add Databricks CLI v0.286.0 as a nix module
Add a new module that packages the pre-built Databricks CLI binary from GitHub releases so Repls can have the databricks command available by default for Databricks apps.
1 parent 4110eba commit 695737a

2 files changed

Lines changed: 46 additions & 0 deletions

File tree

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{ pkgs, lib, ... }:
2+
3+
let
4+
version = "0.286.0";
5+
databricks-cli = pkgs.stdenvNoCC.mkDerivation {
6+
pname = "databricks-cli";
7+
inherit version;
8+
9+
src = pkgs.fetchurl {
10+
url = "https://github.com/databricks/cli/releases/download/v${version}/databricks_cli_${version}_linux_amd64.tar.gz";
11+
hash = "sha256-lf6q0c9iZVNvIzLVrptTe0YudpFDVDdZXMWR8lOObw8=";
12+
};
13+
14+
sourceRoot = ".";
15+
16+
dontConfigure = true;
17+
dontBuild = true;
18+
19+
unpackPhase = ''
20+
tar -xzf $src
21+
'';
22+
23+
installPhase = ''
24+
runHook preInstall
25+
mkdir -p $out/bin
26+
install -m755 databricks $out/bin/databricks
27+
runHook postInstall
28+
'';
29+
};
30+
in
31+
{
32+
id = "databricks-cli";
33+
name = "Databricks CLI";
34+
description = ''
35+
The Databricks CLI is a command-line tool for interacting with
36+
Databricks. It provides commands to manage Databricks resources
37+
such as workspaces, jobs, clusters, libraries, and Databricks
38+
apps from the command line.
39+
'';
40+
displayVersion = version;
41+
42+
replit.packages = [
43+
databricks-cli
44+
];
45+
}

pkgs/modules/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ let
158158
})
159159
(import ./replit-rtld-loader)
160160
(import ./graphite-cli)
161+
(import ./databricks-cli)
161162
];
162163

163164
activeModules = listToAttrs (

0 commit comments

Comments
 (0)