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]}"
'';
})
]
@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