Nix-ld: Difference between revisions
TobiasBora (talk | contribs) No edit summary |
TobiasBora (talk | contribs) add dependencies for zxlive |
||
| (4 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
== Nix-ld == | == Nix-ld == | ||
Nix-ld is a module that is really practical to enable to have a more "traditional" experience in NixOS by recreating the loaders like <code>/lib/ld-linux.so.2</code>, needed to run any executable that is not patched by nix. It is not needed when installing regular packages "the nix way", but it is really handy to quickly test a binary not packaged for nix, or when developing, for instance in javascript/nodejs, since these languages often pre-download many binaries (of course, a proper packaging is of course better, but potentially too tedious when quickly prototyping). | [https://github.com/nix-community/nix-ld Nix-ld] is a module that is really practical to enable to have a more "traditional" experience in NixOS by recreating the loaders like <code>/lib/ld-linux.so.2</code>, needed to run any executable that is not patched by nix. It is not needed when installing regular packages "the nix way", but it is really handy to quickly test a binary not packaged for nix, or when developing, for instance in [[JavaScript|javascript]]/[[node.js|nodejs]], since these languages often pre-download many binaries (of course, a proper packaging is of course better, but potentially too tedious when quickly prototyping). | ||
To enable it, you just need to put in your <code>/etc/nixos/configuration.nix</code> the following:<syntaxhighlight lang="nixos">programs.nix-ld = { | To enable it, you just need to put in your <code>/etc/nixos/configuration.nix</code> the following:<syntaxhighlight lang="nixos">programs.nix-ld = { | ||
| Line 166: | Line 166: | ||
# for blender | # for blender | ||
libxkbcommon | libxkbcommon | ||
libxcrypt-legacy # For natron | |||
libGLU # For natron | |||
# Appimages need fuse, e.g. https://musescore.org/fr/download/musescore-x86_64.AppImage | |||
fuse | |||
e2fsprogs | |||
# darktable nightly AppImage https://github.com/darktable-org/darktable/releases | |||
gmp | |||
# RapidRaw | |||
harfbuzz | |||
libgpg-error | |||
# https://github.com/xournalpp/xournalpp/releases/download/v1.2.4/xournalpp-1.2.4-x86_64.AppImage | |||
fribidi | |||
librsvg | |||
# https://github.com/nix-community/nix-ld/issues/95#issuecomment-3041993870 | |||
(runCommand "librsvg" {} '' | |||
mkdir -p $out/lib/gdk-pixbuf-2.0/2.10.0/loaders | |||
ln -s "${librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader_svg.so" "$out/lib/libpixbufloader-svg.so" | |||
'') | |||
# pdfmastereditor | |||
sane-backends | |||
pkcs11helper | |||
# Qt6 requires this (e.g. used in zxlive) | |||
libpulseaudio | |||
krb5 | |||
libxcb-cursor | |||
xorg.xcbutilwm | |||
xorg.xcbutil | |||
xorg.xcbutilimage | |||
xorg.xcbutilkeysyms | |||
xorg.xcbutilrenderutil | |||
]; | ]; | ||
}; | }; | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Once activated (you may need to reboot the first time you enable nix-ld to make sure the environment variables are properly set), I was for instance able to run blender 4.4.3 using the [https://download.blender.org/release/Blender4.4/blender-4.4.3-linux-x64.tar.xz unpatched binary provided by the blender foundation], and develop npm projects with <code>npm install</code> like in any normal linux distribution. | Once activated (you may need to reboot the first time you enable nix-ld to make sure the environment variables are properly set), I was for instance able to run blender 4.4.3 using the [https://download.blender.org/release/Blender4.4/blender-4.4.3-linux-x64.tar.xz unpatched binary provided by the blender foundation], and develop npm projects with <code>npm install</code> like in any normal linux distribution. | ||