From 46e20b755c812bce1e7429ecaabff7ed6cbc8fbe Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Fri, 18 Aug 2023 10:13:07 +1200 Subject: [PATCH] feat: Add Nix support Creates symlinks to the relevant executables in the Nix store, for integration with IDEs and other tools. --- .gitignore | 3 +++ README.md | 5 +++++ shell.nix | 20 ++++++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 shell.nix diff --git a/.gitignore b/.gitignore index e5cd3fa3..b55e7c2d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,6 @@ dist/ cdk.out/ cdk.context.json build/ +/helm +/kubectl +/node diff --git a/README.md b/README.md index c0ab1238..56b90a60 100644 --- a/README.md +++ b/README.md @@ -224,3 +224,8 @@ These tags are intended to be use in production as they will be published for ea ### Using different versions For each `Workflow` and `WorkflowTemplate`, there is a parameter `version_*` that allows to specify the version of the LINZ container to use. + +## Development + +1. Run `nix-shell` in the current directory to install all non-Node.js dependencies. +1. Run `npm install` to install Node.js dependencies. diff --git a/shell.nix b/shell.nix new file mode 100644 index 00000000..6bdbcb5b --- /dev/null +++ b/shell.nix @@ -0,0 +1,20 @@ +let + pkgs = import (builtins.fetchTarball { + name = "nixos-unstable-2024-09-17"; + url = "https://github.com/nixos/nixpkgs/archive/345c263f2f53a3710abe117f28a5cb86d0ba4059.tar.gz"; + sha256 = "1llzyzw7a0jqdn7p3px0sqa35jg24v5pklwxdybwbmbyr2q8cf5j"; + }) { }; +in +pkgs.mkShell { + packages = [ + pkgs.argo + pkgs.awscli2 + pkgs.bashInteractive + pkgs.kubectl + pkgs.kubernetes-helm + pkgs.nodejs + ]; + shellHook = '' + ln --force --symbolic "${pkgs.kubernetes-helm}/bin/helm" "${pkgs.kubectl}/bin/kubectl" "${pkgs.nodejs}/bin/node" . + ''; +}