Skip to content

Instantly share code, notes, and snippets.

@jiachen247
Created April 23, 2021 13:51
Show Gist options
  • Save jiachen247/26c7ac35c8d78f43f7ddcff59441e9d9 to your computer and use it in GitHub Desktop.
Save jiachen247/26c7ac35c8d78f43f7ddcff59441e9d9 to your computer and use it in GitHub Desktop.
LLVM Sauce Nix Setup

LLVM Sauce Nix Setup

For Nix we require some extra packages. Use this shell.nix, it gets you everything in one shot:

with import <nixpkgs> {};

pkgs.stdenv.mkDerivation rec {
  name = "yarn";
  buildInputs = with pkgs; [
    xorg.libX11
    xorg.libX11.dev
    xorg.libXext
    yarn
    nodejs
    llvm
    cmake
  ];

  LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
}

The extra packages are required due to js-slang needing some package that needs to access the GPU. After running nix-shell you will want to resume installation from yarn install onwards.

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