Skip to content

Commit

Permalink
Merge upstream changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sync Fork committed Jan 25, 2024
1 parent 15c6dfc commit 59aafaf
Show file tree
Hide file tree
Showing 6 changed files with 2,580 additions and 89 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ logs/
coverage/
dist/
umd/
node_modules/
node_modules
tmp/
.pnpm-store
.turbo
Expand Down
5 changes: 3 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"scripts": {
"start": "mintlify dev"
},
"dependencies": {},
"devDependencies": {}
"devDependencies": {
"mintlify": "^4.0.112"
}
}
36 changes: 33 additions & 3 deletions flake.lock

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

99 changes: 92 additions & 7 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
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
pkgs = import nixpkgs {
Expand All @@ -27,6 +28,87 @@

nativeBuildInputs = with pkgs; [
];

node_modules = pkgs.stdenv.mkDerivation {
version = "0.0.0-dev";

pname = "node_modules";

nativeBuildInputs = with pkgs; [
nodePackages.pnpm
cacert
nodejs
];

src = nix-filter.lib.filter {
root = ./.;
include = [
./.npmrc
./pnpm-workspace.yaml
# find . -name package.json | grep -v node_modules
./docs/package.json
./dashboard/package.json
./integrations/stripe-graphql-js/package.json
./integrations/google-translation/package.json
./integrations/react-urql/package.json
./integrations/react-apollo/package.json
./integrations/apollo/package.json
./package.json
./examples/react-gqty/package.json
./examples/cli/package.json
./examples/vue-quickstart/package.json
./examples/serverless-functions/package.json
./examples/vue-apollo/package.json
./examples/codegen-react-urql/package.json
./examples/react-apollo/package.json
./examples/multi-tenant-one-to-many/package.json
./examples/node-storage/package.json
./examples/nextjs/package.json
./examples/codegen-react-query/package.json
./examples/docker-compose/package.json
./examples/docker-compose/functions/package.json
./examples/seed-data-storage/package.json
./examples/codegen-react-apollo/package.json
./examples/quickstarts/nhost-backend/functions/package.json
./examples/quickstarts/nextjs-server-components/package.json
./examples/quickstarts/sveltekit/package.json
./packages/graphql-js/package.json
./packages/nhost-js/package.json
./packages/nhost-js/functions/package.json
./packages/vue/package.json
./packages/hasura-storage-js/package.json
./packages/hasura-storage-js/functions/package.json
./packages/sync-versions/package.json
./packages/nextjs/package.json
./packages/docgen/package.json
./packages/hasura-auth-js/package.json
./packages/hasura-auth-js/functions/package.json
./packages/react/package.json
#find . -name pnpm-lock.yaml | grep -v node_modules
./pnpm-lock.yaml
./examples/cli/pnpm-lock.yaml
./examples/vue-apollo/pnpm-lock.yaml
./examples/react-apollo/pnpm-lock.yaml
./examples/node-storage/pnpm-lock.yaml
./examples/nextjs/pnpm-lock.yaml
./examples/quickstarts/nhost-backend/functions/pnpm-lock.yaml
./examples/quickstarts/sveltekit/pnpm-lock.yaml
./packages/nhost-js/functions/pnpm-lock.yaml
./packages/hasura-storage-js/functions/pnpm-lock.yaml
./packages/hasura-auth-js/functions/pnpm-lock.yaml
];
};

buildPhase = ''
pnpm --version
pnpm install --frozen-lockfile
'';

installPhase = ''
mkdir -p $out
cp -r node_modules $out
'';
};
in
{
checks = {
Expand All @@ -47,11 +129,14 @@
default = pkgs.mkShell {
buildInputs = with pkgs; [
nhost-cli
nodejs_18
nodejs
nodePackages.pnpm
node2nix
mintlify
] ++ buildInputs ++ nativeBuildInputs;

shellHook = ''
rm -rf node_modules
ln -sf ${node_modules}/node_modules/ node_modules
'';
};
};

Expand Down
7 changes: 0 additions & 7 deletions nix/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,4 @@

nodejs = final.nodejs-18_x;
nodePackages = nodejs.pkgs;

mintlify = (final.callPackage ./mintlify/default.nix { }).package.overrideAttrs (old: {
postInstall = ''
find $out
ln -sf $out/lib/node_modules/mintlify/node_modules/.bin/mintlify $out/bin/mintlify
'';
});
})
Loading

0 comments on commit 59aafaf

Please sign in to comment.