I just discover nix os and i think i would be a grate OS to work with maya, nuke, blender, houdini, etc, but i havent found any guide on how to install those softwares in nix, has anyone tried? should i just stay on rocky linux?. aswell i think it would be grate to repreoduce the install on a studio wide server/ machines
Blender package is there; I don’t think others on your list are.
https://search.nixos.org/packages?show=blender
they are not sadly, but for professional vfx use at least on what i work i need nuke and houdini.
It’s often pretty tricky to package proprietary applications, both technically and legally. You’ll need to be quite confident in your understanding of how executable binaries and linking work in Linux land, as well as be quite familiar with how your applications map to this (or learn a lot). Or get very lucky.
This is the first stop to figuring that out, in either case: Packaging/Binaries - NixOS Wiki
I don’t think any of the documentation initiatives have touched this topic yet, it can be quite a faff and relies less on nix/NixOS knowledge than general skill in dealing with everything around Linux software deployment.
You could be the first to try this with vfx packages though if you have a lot of time on your hands
Yes, probably quite hard right now, as you write that you just discovered NixOS…
well i got weekends haha, and i found a way to install .debs in nixos ill try that route first i guess
dumb question, so the guys that did it gor arch might be in “legal mud”?, cause i can find those in the aur and connect a license
The AUR only distributes build scripts, which - for most proprietary software - download the installer from the official download link and run that. This is fine legally, as the AUR is not redistributing the software, just distributing installation automation. This is one of the reason why it can contain software that is not available in any other distro’s repository.
All (actually most, clarified in the next post) software packaged in nixpkgs is available from a “binary cache”, which means the software is not downloaded from the original source. This is similar to how most official distro repositories distribute packages.
There is also the NUR, which works more like the AUR in that the packages are built on your machine, though I didn’t find the software you’re looking for there either.
So, you have two options now; you can package the software you need yourself, or you just download it and run it like a normal application.
Packaging the software yourself is the preferred approach for experienced users, as it integrates the software better into your system, but it quite difficult as @TLATER explained, but it would be very cool as you can rthen contribute the package to the NUR so others can profit from your work.
The second option is also not as straightforward as you may think, as NixOS doesn’t provide many of the “well-known” paths software can expect to exist on other distros, like “/bin”, “/usr/bin” or “/lib”. To give software an environment that looks more familiar, you’ll have to use a tool like buildFHSEnv or steam-run.
I’m not sure if you just want to do this on your personal machine or a fleet of machines at work, so that may influence if this is worth it for you as well.
Not all software. nixpkgs has support for user-supplied files, which will make nix prompt you to download and manually add a file to your store before it runs the build: https://nixos.org/manual/nixpkgs/stable/#requirefile
This means nixpkgs can (and does) actually contain non-redistributable packages, too, they just take some time to build on the users’ machine. nix means that our packages are more like the AUR and arch packages in one, with more-or-less guaranteed successful builds (caveat memory/disk space limitations).
Oh wow I had no idea! So it would actually be possible to package everything @ghst-party mentioned in nixpkgs directly.
Probably. Law is like weird, imprecise, unpredictable software executed manually by people who have no idea about software. I’d at least give the license a proper read if I was going to attempt this.
@iFreilicht @TLATER
well, so im a vfx artist compositing & lighting artist. I daily drive a rocky linux isntallation for this porpuse, but i have been able break it multiple times(i like to mess a lot whit things). when i heard and look in to NixOS i thought what a great os to test packages and rollback if something goes wrong. thats why i thought it would be great for vfx.
In the near future im collaborating with other friends to create a small studio and we wanted to be linux based basiclly because everything runs better in linux haha.
After reading what you are saying im willing to try in a vm a share my results, if laws permits me. If not maybe only the proccess? so anybody interesed enough can replicate it.
in the meantime ill be updating this comment with links i found usefull.
for nuke:
https://learn.foundry.com/nuke/content/getting_started/installation/linux.html
for maya:
https://www.reddit.com/r/NixOS/comments/bs4q2p/installing_deb_packages_in_nixos/
for houdini fx:
That would be awesome! I’ll gladly support and try to answer questions when they come up, though I don’t have much experience with packaging yet.
Good luck! It can be a slog to first get into nix/NixOS, especially if you don’t come from a heavy programming background, don’t hesitate to ask if you need help
Oh please keep this thread going. I’m in VFX too and just started fiddling around with NixOS.
So, I got one mile stone: Blender (not the pre-packaged version but the tarball downloaded from Blender.org). This is potentially applicable to other binaries like Houdini or Nuke as well, but I have not tested yet. I’m new, so maybe I’m doing it wrong. Corrective critique is most welcome!
./derivations/blender/blender-3.6.2.nix
:
# https://discourse.nixos.org/t/how-to-extract-and-build-when-using-local-tar-files/19049
{
pkgs,
lib,
}:
let
pname = "blender";
version = "3.6.2-linux-x64";
in
pkgs.stdenv.mkDerivation rec {
buildInputs = with pkgs; [ tree ];
name = "${pname}_${version}";
meta = with lib; {
description = "Blender 3.6.2 (LTS) for Linux x64";
homepage = "https://builder.blender.org/download/daily/archive/";
platforms = platforms.linux;
};
src = fetchTarball {
url = "https://ftp.halifax.rwth-aachen.de/blender/release/Blender3.6/${pname}-${version}.tar.xz";
};
unpackPhase = "true";
installPhase = ''
runHook preInstall
mkdir -p $out/share/blender/${pname}-${version}/
cp -r $src/* $out/share/blender/${pname}-${version}/ # use 'install'?
mkdir -p $out/bin/
cd $out/bin/
ln -s ../share/blender/${pname}-${version}/${pname} ${pname}-${version}
# ln -s ../share/blender/${pname}-${version}/${pname}-launcher ${pname}-${version}-launcher
# ln -s ../share/blender/${pname}-${version}/${pname}-softwaregl ${pname}-${version}-softwaregl
# ln -s ../share/blender/${pname}-${version}/${pname}-thumbnailer ${pname}-${version}-thumbnailer
runHook postInstall
'';
}
./derivations/blender/blender-3.6.2-shell.nix
:
{ pkgs ? import <nixpkgs> {} }:
(pkgs.buildFHSEnv {
name = "blender-3.6.2-shell";
targetPkgs = pkgs: (with pkgs; [
opensubdiv
zlib
libxkbcommon
libGL
libGLU
]) ++ (with pkgs.stdenv.cc.cc; [
lib
]) ++ (with pkgs.xorg; [
libX11
libXrender
libXxf86vm
libXfixes
libXi
libSM
libICE
libXext
libSM
]);
runScript = "blender-3.6.2-linux-x64";
}).env
./configuration.nix
:
environment.systemPackages =
with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
[...]
# I only had to add these manually, but more libs
# are probably required if they did not already
# come as dependencies of other packages.
libGL
libGLU
[...]
blender_3-6-2
];
shell
:
$ nix-shell /etc/nixos/derivations/blender/blender-3.6.2-shell
Read prefs: /home/michael/.config/blender/3.6/config/userpref.blend
Warning: Could not find a matching GPU name. Things may not behave as expected.
Detected OpenGL configuration:
Vendor: VMware, Inc.
Renderer: SVGA3D; build: RELEASE; LLVM;
However, these are still missing and I have not figured out yet how I can install them. Blender starts nonetheless:
libGLcore.so.1
libnvidia-tls.so.1
Resources:
Fascinating that it manages to start, but is there any particular reason you don’t just use the nixpkgs package? It’s up-to-date and everything, and the difference between the upstream and nixpkgs builds should be reconcilable if there are significant ones, given blender is actually FOSS.
For detailed instructions on how to make a fully-featured blender package, you can also look at the actual package definition: https://github.com/NixOS/nixpkgs/blob/0bffda19b8af722f8069d09d8b6a24594c80b352/pkgs/applications/misc/blender/default.nix
Yes, the nixpkgs
version of blender works perfectly fine. The reason for this discussion (also for @ghst-party) is that professional VFX and animation production environments heavily rely on commercial tools. Hence, to be able to consistently work within any given pipeline, it is easier to go for a single standard way of installing such tools (and - when running on non NixOS distros - calling them from within an environment manager such as for example Rez). So, the main focus point is how to get the COMMERCIAL packages up and running. Blender offers packaged binaries that can be installed and used similarly to those commercial tools. In that sense, using nixpkgs
versions of blender (and by far not only blender) breaks professional production environments’ installation workflows.
I did take a look of blender default.nix
. Again, the reason why this is not a good option is that I can’t replicate and apply such a process to commercial software because I have no access to the sources.
Speaking or Rez: the main reason why I am giving NixOS a shot is that it could potentially mimic Rez’s functionality to a high (er?) degree…
I guess being able to download, install and run standard tar packages on NixOS is mandatory in VFX. @TLATER , you say “Fascinating” as if it was an implication for “it should not work”. Do you have suggestions where I can improve what I have presented here?
I just checked out Houdini on nixpkgs
and it seems my approach for blender is not that far off. What confused me initially was that the source
link for houdini on nixpkgs points to trivial builders, which seems off to me.