Skip to content

Instantly share code, notes, and snippets.

@Lgmrszd
Last active February 6, 2026 18:36
Show Gist options
  • Select an option

  • Save Lgmrszd/98fb7054e63a7199f9510ba20a39bc67 to your computer and use it in GitHub Desktop.

Select an option

Save Lgmrszd/98fb7054e63a7199f9510ba20a39bc67 to your computer and use it in GitHub Desktop.
MC modding shell
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
libs = with pkgs; [
libpulseaudio
libGL
glfw
openal
stdenv.cc.cc.lib
];
in {
devShell.x86_64-linux = pkgs.mkShell {
packages = [];
buildInputs = libs;
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath libs;
};
};
}
{ pkgs, ... }
with pkgs; [
(symlinkJoin {
name = "idea-community";
paths = [ jetbrains.idea-community ];
buildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/idea-community \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [libpulseaudio libGL glfw openal stdenv.cc.cc.lib]}"
'';
})
]
@Alper-Celik
Copy link
Copy Markdown

thank you so much

@Lgmrszd
Copy link
Copy Markdown
Author

Lgmrszd commented May 9, 2024

@Alper-Celik completely forgot I had this. I moved to just having idea-community package wrapped instead. It is probably not the most ideal solution but it works well. I updated this gist to include this.

@neirenoir
Copy link
Copy Markdown

Just wanted to say this config saved my project. Thank you!

@flashgnash
Copy link
Copy Markdown

It's a shame this env variable isn't set by default when libgl is installed.

Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment