Skip to content

Commit

Permalink
fix: added dependencies to build with gyp (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarrosop authored May 21, 2024
1 parent 3538db6 commit e555c7f
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 29 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ENV SWC_NODE_PROJECT $SERVER_PATH/tsconfig.json

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

# * Install packages that are required for this docker image to run
RUN npm install -g pnpm nodemon express@$EXPRESS_VERSION morgan [email protected] tsx @antfu/ni
Expand Down
54 changes: 42 additions & 12 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 17 additions & 16 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,23 @@
description = "Nhost Functions";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nix-filter.url = "github:numtide/nix-filter";
flake-utils.url = "github:numtide/flake-utils";
nixops.url = "github:nhost/nixops";
nixpkgs.follows = "nixops/nixpkgs";
flake-utils.follows = "nixops/flake-utils";
nix-filter.follows = "nixops/nix-filter";
};

outputs = { self, nixpkgs, flake-utils, nix-filter }:
outputs = { self, nixops, nixpkgs, flake-utils, nix-filter }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [
(final: prev: {
nodejs = prev.nodejs-18_x;
})
];

pkgs = import nixpkgs {
inherit overlays system;
inherit system;
overlays = [
nixops.overlays.default
(final: prev: {
nodejs = prev.nodejs-18_x;
})
];
};

nix-src = nix-filter.lib.filter {
Expand Down Expand Up @@ -89,11 +90,11 @@
gnumake
] ++ buildInputs ++ nativeBuildInputs;

shellHook = ''
export PATH=${node_modules}/node_modules/.bin:$PATH
rm -rf node_modules
ln -sf ${node_modules}/node_modules/ node_modules
'';
# shellHook = ''
# export PATH=${node_modules}/node_modules/.bin:$PATH
# rm -rf node_modules
# ln -sf ${node_modules}/node_modules/ node_modules
# '';
};
};
}
Expand Down

0 comments on commit e555c7f

Please sign in to comment.