-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
35b71c3
commit 70fdb43
Showing
3 changed files
with
43 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# this derivation is based on https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh | ||
{ pkgs , artifactVersion ? "v1.1.0" }: | ||
|
||
# TODO: support multi OS and arch - currently only darwin_amd64 is hard coded | ||
|
||
with pkgs; let | ||
# fix this to adapt different arch - https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh | ||
os_arch = "darwin_amd64"; | ||
artifactSha256 = "051vyfmdkf2nmxd3ry175cl3bb0hgklgq00vi2ym52sqyfaplwyl"; | ||
in | ||
# https://ops.functionalalgebra.com/nix-by-example/ | ||
stdenv.mkDerivation rec { | ||
name = "crossplane-cli"; | ||
version = "${artifactVersion}"; | ||
|
||
src = fetchurl { | ||
url = "https://releases.crossplane.io/stable/${artifactVersion}/bin/${os_arch}/crank"; | ||
sha256 = "${artifactSha256}"; | ||
}; | ||
|
||
phases = "installPhase"; | ||
|
||
installPhase = '' | ||
mkdir -p $out/bin | ||
cp ${src} $out/bin/kubectl-crossplane | ||
chmod +x $out/bin/kubectl-crossplane | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
{ pkgs ? import <nixpkgs> {} }: | ||
|
||
pkgs.mkShell { | ||
buildInputs = with pkgs;[ | ||
minikube | ||
kubectl | ||
k9s | ||
kubernetes-helm | ||
terraform_0_14 | ||
]; | ||
let | ||
crossplane-cli = import ./crossplane-cli.nix { pkgs=pkgs; }; | ||
in | ||
pkgs.mkShell { | ||
buildInputs = with pkgs;[ | ||
minikube | ||
kubectl | ||
k9s | ||
kubernetes-helm | ||
terraform_0_14 | ||
crossplane-cli | ||
]; | ||
|
||
# Environment variables to set here - https://discourse.nixos.org/t/provide-environmental-variables-from-nix/3453/3 | ||
KUBECONFIG = "./.kube/config"; | ||
DEBUG_NIX = builtins.currentSystem; | ||
} |