Search code examples
rubylinuxrubygemsnixosruby2d

Nixos can't install ruby2d gem


output shell.nix

When i execute gem install ruby2d in my nix-shell it can't, because nix has no fhs. Can u help me?


Solution

  • I was able to install libGL using the following script:

    { pkgs ? import <nixpkgs> {} }:
     
    (pkgs.buildFHSUserEnv {
      name = "env";
      targetPkgs = pkgs: (with pkgs;
      [
        ruby_3_0
        bundler
        rake
        SDL.dev
        SDL2.dev
        SDL2_image
        SDL2_mixer
        SDL2_ttf
        libGL
     
        gccStdenv
        stdenv
        rbenv
        ]);
      runScript = "bash";
    }).env