From e7d2e6a29892694d8d0af3a627211e7fdff96a98 Mon Sep 17 00:00:00 2001 From: Callum Dunster Date: Wed, 29 Jan 2025 18:32:18 +0100 Subject: [PATCH 1/3] chore: add support for using flakes with direnv --- .envrc | 1 + 1 file changed, 1 insertion(+) create mode 100644 .envrc diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake From 816f27290f4df60d62faf7943e4f4c5996c5d54d Mon Sep 17 00:00:00 2001 From: Callum Dunster Date: Wed, 29 Jan 2025 19:04:43 +0100 Subject: [PATCH 2/3] chore: add go package to flake.nix --- flake.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 4d20974..bc2a536 100644 --- a/flake.nix +++ b/flake.nix @@ -30,8 +30,10 @@ { formatter = pkgs.nixpkgs-fmt; devShells.default = pkgs.mkShell { - # Note that Go is not provided, because it does not behave correctly inside a Nix shell. - packages = [ pulumiBundle ]; + packages = with pkgs; [ + go + pulumiBundle + ]; }; }; }; From 1fe9a2009807e172c9a91e81362ec77d8a22b4de Mon Sep 17 00:00:00 2001 From: Callum Dunster Date: Thu, 30 Jan 2025 11:27:08 +0100 Subject: [PATCH 3/3] docs: add comment in flake about why we need the pulumi bundle --- flake.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flake.nix b/flake.nix index bc2a536..6a78883 100644 --- a/flake.nix +++ b/flake.nix @@ -14,6 +14,9 @@ perSystem = { config, pkgs, system, ... }: let + # Bundle the Pulumi binary with the language package to remove the + # warning about them not being in the same directory. + # See: https://github.com/pulumi/pulumi/issues/14525 pulumiBundle = pkgs.stdenv.mkDerivation { name = "pulumi-bundle"; phases = [ "installPhase" "fixupPhase" ];