mirror of
https://github.com/servo/servo.git
synced 2025-09-23 05:10:09 +01:00
Allow building with Nix on Linux distros other than NixOS (#31001)
* remove NixOS check from mach wrapper * pin nixpkgs to fix jemalloc-sys + mozangle build scripts * add stdenv.cc.cc to LD_LIBRARY_PATH to fix webrender build.rs * add all buildInputs to LD_LIBRARY_PATH to fix ldd servo * add glib + zlib to buildInputs to fix ldd servo * working! patchelf --remove-rpath --set-interpreter * undo changes that were ultimately unhelpful * make compiled programs independent of Nix * avoid installing patchelf’d toolchains in ~/.rustup * remove another spurious change * fix rustup pollution * only enable on other distros when MACH_USE_NIX is set
This commit is contained in:
parent
6a804cd775
commit
94a3c49a80
3 changed files with 53 additions and 6 deletions
3
mach
3
mach
|
@ -31,7 +31,8 @@ def main(args):
|
|||
if __name__ == '__main__':
|
||||
sys.dont_write_bytecode = True
|
||||
|
||||
if os.path.exists('/etc/NIXOS') and not 'IN_NIX_SHELL' in os.environ: # we're on a nixOS system, need to run mach in nix-shell
|
||||
need_nix_shell = os.path.exists('/etc/NIXOS') or 'MACH_USE_NIX' in os.environ
|
||||
if need_nix_shell and not 'IN_NIX_SHELL' in os.environ:
|
||||
import subprocess
|
||||
from shlex import quote
|
||||
mach_dir = os.path.abspath(os.path.dirname(__file__))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue