-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
40 lines (35 loc) · 1.06 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
description = "Script embedded in a web application that informs of the application's inputs to a serverless backend";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
pulumi_3_67_0 = {
flake = false;
url = "https://github.com/pulumi/pulumi/releases/download/v3.67.0/pulumi-v3.67.0-darwin-arm64.tar.gz";
};
};
outputs = {
self,
nixpkgs,
pulumi_3_67_0,
}: let
pkgs = nixpkgs.legacyPackages.aarch64-darwin;
in {
packages.x86_64-linux.hello = pkgs.hello;
packages.x86_64-linux.default = self.packages.x86_64-linux.hello;
devShell."aarch64-darwin" = let
nodeEnv = pkgs.callPackage ./default.nix {inherit pkgs;};
in
pkgs.mkShell {
buildInputs = [
nodeEnv.shell.nodeDependencies
pkgs.awscli2
];
shellHook = ''
export NODE_PATH="${nodeEnv.shell.nodeDependencies}/lib/node_modules"
export PATH="${pulumi_3_67_0}:$PATH"
ln -fs $NODE_PATH node_modules
ln -fs $NODE_PATH infra/aws/node_modules
'';
};
};
}