Skip to content

Instantly share code, notes, and snippets.

@Lgmrszd
Last active June 30, 2024 21:40
Show Gist options
  • Save Lgmrszd/98fb7054e63a7199f9510ba20a39bc67 to your computer and use it in GitHub Desktop.
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

thank you so much

@Lgmrszd
Copy link
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

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

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