UP | HOME

shell.nix

I was trying to get vrs running on NixOS; I was struggling with pkg-config stuff. Aaron gave me a template shell.nix to use.

{ pkgs ? import <nixpkgs> { } }:
pkgs.mkShell {
  shellHook = ''
    PS1='\u@\h:\w; '
    LD_PRELOAD="${pkgs.xorg.libX11}/lib/libX11.so ${pkgs.xorg.libXcursor}/lib/libXcursor.so"
  '';
  buildInputs = with pkgs; [
    cacert
    git
    openssl
    pkg-config
    jack2
    python3
    alsa-lib
    libudev-zero
    python39Packages.progressbar2
    python39Packages.pyusb
    fontconfig
    dbus
    simpleDBus
    python39Packages.requests
    rustup
    musl
    wget
    hidapi
    protobuf
    xorg.libX11
    xorg.libXcursor
    xorg.libXi
    xorg.libXinerama
    xorg.libXrandr
    xorg.libXxf86vm
    xorg.xinput
  ];
}

here's a shell.nix you can drop in a dir

do `nix shell` in a dir with a shell.nix

and it will pull in the deps / make the env work

Notes

  • musl caused a lot of problems in the particular use-case I set this up for.