Skip to content

Commit e555c7f

Browse files
authored
fix: added dependencies to build with gyp (#24)
1 parent 3538db6 commit e555c7f

File tree

3 files changed

+60
-29
lines changed

3 files changed

+60
-29
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ ENV SWC_NODE_PROJECT $SERVER_PATH/tsconfig.json
2727

2828
# install dependencies
2929
RUN apk update && apk upgrade && \
30-
apk add --no-cache git openssh
30+
apk add --no-cache git openssh python3 make g++
3131

3232
# * Install packages that are required for this docker image to run
3333
RUN npm install -g pnpm nodemon express@$EXPRESS_VERSION morgan [email protected] tsx @antfu/ni

flake.lock

+42-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+17-16
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,23 @@
22
description = "Nhost Functions";
33

44
inputs = {
5-
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
6-
nix-filter.url = "github:numtide/nix-filter";
7-
flake-utils.url = "github:numtide/flake-utils";
5+
nixops.url = "github:nhost/nixops";
6+
nixpkgs.follows = "nixops/nixpkgs";
7+
flake-utils.follows = "nixops/flake-utils";
8+
nix-filter.follows = "nixops/nix-filter";
89
};
910

10-
outputs = { self, nixpkgs, flake-utils, nix-filter }:
11+
outputs = { self, nixops, nixpkgs, flake-utils, nix-filter }:
1112
flake-utils.lib.eachDefaultSystem (system:
1213
let
13-
overlays = [
14-
(final: prev: {
15-
nodejs = prev.nodejs-18_x;
16-
})
17-
];
18-
1914
pkgs = import nixpkgs {
20-
inherit overlays system;
15+
inherit system;
16+
overlays = [
17+
nixops.overlays.default
18+
(final: prev: {
19+
nodejs = prev.nodejs-18_x;
20+
})
21+
];
2122
};
2223

2324
nix-src = nix-filter.lib.filter {
@@ -89,11 +90,11 @@
8990
gnumake
9091
] ++ buildInputs ++ nativeBuildInputs;
9192

92-
shellHook = ''
93-
export PATH=${node_modules}/node_modules/.bin:$PATH
94-
rm -rf node_modules
95-
ln -sf ${node_modules}/node_modules/ node_modules
96-
'';
93+
# shellHook = ''
94+
# export PATH=${node_modules}/node_modules/.bin:$PATH
95+
# rm -rf node_modules
96+
# ln -sf ${node_modules}/node_modules/ node_modules
97+
# '';
9798
};
9899
};
99100
}

0 commit comments

Comments
 (0)