Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ tasks/construction_tasks/train/**
server_data*
**/.DS_Store
src/mindcraft-py/__pycache__/
flake.lock
34 changes: 34 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
description = "MindCraft flake";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};

outputs = {
nixpkgs,
...
}:
let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
in {
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
nodejs_20
libX11
libXext
libuuid
];
# shellHook = ''
# export LD_LIBRARY_PATH="${pkgs.libX11}/lib:${pkgs.libXext}/lib:$LD_LIBRARY_PATH"
# '';
env = {
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
pkgs.libX11
pkgs.libXext
pkgs.libuuid
];
};
};
};
}
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"globals": "^15.11.0",
"google-translate-api-x": "^10.7.1",
"groq-sdk": "^0.15.0",
"minecraft-data": "^3.97.0",
"minecraft-data": "3.97.0",
"minecraft-assets": "^1.16.0",
"mineflayer": "^4.33.0",
"mineflayer": "4.33.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you locking this package to 4.33.0?

@rojfc rojfc May 20, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay i just need to run "npx patch-package mineflayer" and it would work without changing package.json, although it would change patch name for "mineflayer" so this change of package.json maybe would be unnecessary. So that just patches version mismatch. But without override of tar i get error.

npm audit report

tar  <=7.5.10
Severity: high
node-tar Vulnerable to Arbitrary File Creation/Overwrite via Hardlink Path Traversal - https://github.com/advisories/GHSA-34x7-hfp2-rc4v
node-tar is Vulnerable to Arbitrary File Overwrite and Symlink Poisoning via Insufficient Path Sanitization - https://github.com/advisories/GHSA-8qq5-rm4j-mr97
Arbitrary File Read/Write via Hardlink Target Escape Through Symlink Chain in node-tar Extraction - https://github.com/advisories/GHSA-83g3-92jg-28cx
tar has Hardlink Path Traversal via Drive-Relative Linkpath - https://github.com/advisories/GHSA-qffp-2rhf-9h96
node-tar Symlink Path Traversal via Drive-Relative Linkpath - https://github.com/advisories/GHSA-9ppj-qmqm-q256
Race Condition in node-tar Path Reservations via Unicode Ligature Collisions on macOS APFS - https://github.com/advisories/GHSA-r6q2-hw4h-h46w
No fix available
node_modules/tar
  cacache  14.0.0 - 18.0.4
  Depends on vulnerable versions of tar
  node_modules/cacache
    make-fetch-happen  7.1.1 - 14.0.0
    Depends on vulnerable versions of cacache
    node_modules/make-fetch-happen
      node-gyp  <=10.3.1
      Depends on vulnerable versions of make-fetch-happen
      Depends on vulnerable versions of tar
      node_modules/node-gyp
        gl  0.0.5 - 8.1.6
        Depends on vulnerable versions of node-gyp
        node_modules/gl
          node-canvas-webgl  *
          Depends on vulnerable versions of gl
          node_modules/node-canvas-webgl

6 high severity vulnerabilities

Some issues need review, and may require choosing
a different dependency.

So this one is probably necessary.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

audit report doens't look like an error to me. do you get any actual error?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So... What is the purpose exactly of this PR?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to add flake file so it can be builded on nixos.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you can undo the changes to package.json then?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, flake not correlated to package.json, i just wanted to point that i also have problem on building it. i just don't good at js, so i think what i get is an error.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So are you going to undo the changes?

"mineflayer-armor-manager": "^2.0.1",
"mineflayer-auto-eat": "^3.3.6",
"mineflayer-collectblock": "^1.4.1",
Expand All @@ -39,7 +39,8 @@
},
"overrides": {
"canvas": "^3.1.0",
"gl": "^8.1.6"
"gl": "^8.1.6",
"tar": "^7.5.11"
},
"scripts": {
"postinstall": "patch-package",
Expand Down