Skip to content

Commit

Permalink
Merge pull request #6 from AtomiCloud/new/gardenio
Browse files Browse the repository at this point in the history
new(garden): Automation for Kubernetes development and testing
  • Loading branch information
kirinnee authored Jan 29, 2025
2 parents d122176 + 1674072 commit 5f4d88d
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
.#aws-export-credentials
.#cyanprint
.#atomiutils
.#gardenio
-c bash -c '
sg --version &&
upstash --version &&
Expand All @@ -66,6 +67,7 @@ jobs:
toml --version &&
nix-share &&
cyanprint --version &&
garden version &&
echo "🎉 Done"'
release:
Expand Down
53 changes: 53 additions & 0 deletions binWrapper/gardenio.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{ nixpkgs }:
with nixpkgs;
let
inherit (stdenv.hostPlatform) system;
throwSystem = throw "Unsupported system: ${system}";

plat = {
x86_64-linux = "linux-amd64";
aarch64-linux = "linux-arm64";

x86_64-darwin = "macos-amd64";
aarch64-darwin = "macos-arm64";
}.${system} or throwSystem;

archive_fmt = "tar.gz";

sha256 = {
x86_64-linux = "sha256-SKCSVjuinX3K1k8nImiXKn00CZUimioMcwB7YzmhJ9M=";
aarch64-linux = "sha256-UUa6eI5CpquVsm5wkzzVypkKOIlsmHZvyWOtYotmUkg=";

x86_64-darwin = "sha256-6PGfbpNjdMEVSse0SfSxgjTbiwFtx2KchY7EBwmlOLo=";
aarch64-darwin = "sha256-5fhtkuQqP+IXNoGhpYuSLpyXVJwLqMGgZ/x42shOoG4=";
}.${system} or throwSystem;
in
let version = "0.13.50"; in

stdenv.mkDerivation (finalAttrs: {
pname = "gardenio";
inherit version;

installPhase = ''
mkdir -p $out/bin
cp garden $out/bin/garden
chmod +x $out/bin/garden
'';

src = builtins.fetchurl {
url = "https://download.garden.io/core/${version}/garden-${version}-${plat}.tar.gz";
inherit sha256;
};

meta = with lib; {
description = "garden";
longDescription = ''
Automation for Kubernetes development and testing.
'';
mainProgram = "garden";
homepage = "https://garden.io/";
downloadPage = "https://github.com/garden-io/garden/releases";
license = licenses.mit;
platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" "aarch64-linux" ];
};
})
1 change: 1 addition & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ let
bin = {
mirrord = import ./binWrapper/mirrord.nix { inherit nixpkgs; };
atomiutils = import ./binWrapper/atomiutils.nix { inherit nixpkgs; };
gardenio = import ./binWrapper/gardenio.nix { inherit nixpkgs; };
};

rust = import ./rust/default.nix { inherit nixpkgs fenix; };
Expand Down

0 comments on commit 5f4d88d

Please sign in to comment.