about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/cluster/click
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/cluster/click')
-rw-r--r--nixpkgs/pkgs/applications/networking/cluster/click/default.nix29
-rw-r--r--nixpkgs/pkgs/applications/networking/cluster/click/fix_cargo_lock_version.patch13
2 files changed, 42 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/networking/cluster/click/default.nix b/nixpkgs/pkgs/applications/networking/cluster/click/default.nix
new file mode 100644
index 000000000000..cb7c41d0c8a1
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/cluster/click/default.nix
@@ -0,0 +1,29 @@
+{ darwin, fetchFromGitHub, rustPlatform, stdenv }:
+
+with rustPlatform;
+
+buildRustPackage rec {
+  name = "click-${version}";
+  version = "0.3.2";
+
+  src = fetchFromGitHub {
+    rev = "v${version}";
+    owner = "databricks";
+    repo = "click";
+    sha256 = "0sbj41kypn637z1w115w2h5v6bxz3y6w5ikgpx3ihsh89lkc19d2";
+  };
+
+  cargoSha256 = "1179a17lfr3001vp1a2adbkhdm9677n56af2c0zvkr18jas6b2w7";
+
+  patches = [ ./fix_cargo_lock_version.patch ];
+
+  buildInputs = stdenv.lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
+
+  meta = with stdenv.lib; {
+    description = ''The "Command Line Interactive Controller for Kubernetes"'';
+    homepage = https://github.com/databricks/click;
+    license = [ licenses.asl20 ];
+    maintainers = [ maintainers.mbode ];
+    platforms = [ "x86_64-linux" "x86_64-darwin" ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/networking/cluster/click/fix_cargo_lock_version.patch b/nixpkgs/pkgs/applications/networking/cluster/click/fix_cargo_lock_version.patch
new file mode 100644
index 000000000000..bc4db7ef7c12
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/cluster/click/fix_cargo_lock_version.patch
@@ -0,0 +1,13 @@
+diff --git a/Cargo.lock b/Cargo.lock
+index ff80350..c86c6fe 100644
+--- a/Cargo.lock
++++ b/Cargo.lock
+@@ -111,7 +111,7 @@ dependencies = [
+
+ [[package]]
+ name = "click"
+-version = "0.3.1"
++version = "0.3.2"
+ dependencies = [
+  "ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
+  "base64 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",