Change:
Describe the bug I've tried installing unity3d, both from 20.03 and unstable channels, but in both cases running fails with the following error: To Reproduce Steps to reproduce the behavior: to system packages in a terminal, run Expected behavior The program should start Metadata system: host os: multi-user?: sandbox: version: channels(root): nixpkgs:
I thought an strace might also be relevant in this case: In particular, by looking at this, it seems the nss package path in the nix store is being checked, but only when the loader is looking for other files. When it actually tries to find , it only checks the two following locations: - Also maybe relevant: I was able to run the editor with , but it crashed not long after when I tried to open a file picker dialog.
cc
I have the same problem. After researching it for a while I found that seems to be a dependency of Even though the Unity executable has the correct path to in its RUNPATH, only has $ORIGIN in its RPATH. I guess this is why it's looking for in the same directory the executable is located in.
Can you try running with ?
That's what I originally did to find the root of the problem. Here's the output: If I patchelf with the correct RPATH manually, Unity runs but segfaults. I have to set write permissions first, though. Could it be the issue? I tried adding to the file, just before but it didn't seem to help: the permissions on are still 555 after rebuilding, and RPATH is still $ORIGIN.
Okay, so the problem is in this line: The regular expression does not match for some reason.
I don't understand how these lines work: The comment says that it excludes "PlaybackEngines", but the actual call to find includes only files with the name "PlaybackEngines". Should the condition be instead?
No, that line works correctly. The switch does the exclusion.
The regular expression does not match because for gives the following result when executed in the build script: And this is when I run the command manually after the build: What could possibly cause this?
Can you calculate hashes before/after? Are the versions of identical in both environments?
The MD5 hash of is the same in both cases: versions are the same, although their magic file paths are different: Their binaries' MD5 hashes are also different. I tried running on using the magic files from /nix/store: . It didn't change the output: On the other hand, running the binary from /nix/store: prints
I've been able to successfully run Unity Editor by downgrading to this commit: Still have no idea why the latest version determines the file type incorrectly.

Discussion:
, cairo, dbus, expat, zlib, libpng12, nodejs, gnutar, gcc, gcc_32bit , libX11, libXcursor, libXdamage, libXfixes, libXrender, libXi , libXcomposite, libXext, libXrandr, libXtst, libSM, libICE, libxcb, chromium <del> , libpqxx </del> <ins> , libpqxx, libselinux, pciutils, libpulseaudio </ins> }: let

libX11 libXcursor libXdamage libXfixes libXrender libXi libXcomposite libXext libXrandr libXtst libSM libICE libxcb libpqxx gtk3 <ins> libselinux pciutils libpulseaudio </ins> ]; libPath32 = lib.makeLibraryPath [ gcc_32bit.cc ]; binPath = lib.makeBinPath [ nodejs gnutar ];

mkdir -p $out/bin makeWrapper $unitydir/Unity $out/bin/unity-editor  <ins> --prefix LD_LIBRARY_PATH : "${libPath64}"  </ins> --prefix LD_PRELOAD : "$unitydir/libunity-nosuid.so"  --prefix PATH : "${binPath}" '';