You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Sven Slootweg 828b06b001 1.0.1 7 years ago
bin Initial commit 7 years ago
.gitignore Initial commit 7 years ago
README.md Initial commit 7 years ago
package.json 1.0.1 7 years ago

README.md

devshell

A simple tool for spawning a nix-shell with certain packages in the LD_LIBRARY_PATH. Useful for experimenting with runtime-loaded dependencies.

License

WTFPL or CC0, whichever you prefer. A donation and/or attribution are appreciated, but not required.

Donate

Maintaining open-source projects takes a lot of time, and the more donations I receive, the more time I can dedicate to open-source. If this module is useful to you, consider making a donation!

You can donate using Bitcoin, PayPal, Flattr, cash-in-mail, SEPA transfers, and pretty much anything else. Thank you!

Installation

npm install -g nix-devshell

Usage:

$ devshell xorg.libX11 xorg.libXcursor xorg.libXxf86vm xorg.libxcb xorg.libXi
Spawning shell with packages [xorg.libX11, xorg.libXcursor, xorg.libXxf86vm, xorg.libxcb, xorg.libXi] in the LD_LIBRARY_PATH...
$ echo $LD_LIBRARY_PATH
/nix/store/6ilsr4fz201drpwdxs8n7yv8fdnwhfb8-libX11-1.6.5/lib:/nix/store/cqsz57g4xlmnm2rlcwdg859qxfwqcfb9-libXcursor-1.1.14/lib:/nix/store/jlc87n7xkcgq7kp8lsn5bhrs86lhifbj-libXxf86vm-1.1.4/lib:/nix/store/02xfc39dvwiwsdq9gq2zv2119wmpnfmm-libxcb-1.12/lib:/nix/store/0wcsp7hcn0nwgmfd93dqxdn22f8vmfip-libXi-1.7.9/lib:/nix/store/083slkpsm9b56bg3p8jay7q2lwql45q7-dbus-1.10.16-lib/lib:/nix/store/wdk4s775vpz62q60qi1kwm2r8z538xp0-gtk+-2.24.31/lib:/nix/store/1lpizdxwhzkng0mii4mmwbq817zw7kw9-gconf-2.32.4/lib:/nix/store/zq0lf0fdc7n12zcdcs2qq3viz6mc87vr-python-2.7.13/lib:/nix/store/sa9hzl6qj8yxnv9nf6m0ffvdyqyfj6fq-libutempter-1.1.6/lib:/nix/store/62v6dvvspkxm2c8hx2lvz4kyyq8r2788-vte-0.28.2/lib:/nix/store/rawp1abvrzv3fi5lq0x616dz3rj0scmh-keybinder-0.3.0/lib:/nix/store/kf8izhdr8nkbslfl1423wlvzhlpfx4fz-gnome-common-3.18.0/lib:/run/opengl-driver/lib:/run/opengl-driver-32/lib

The new entries are prepended to the LD_LIBRARY_PATH in the environment from which you ran devshell, so it won't break things like OpenGL. You can use the resulting shell in the exact same way as you'd use nix-shell; simply exit it to return to your 'real' shell.