+ def get_answer():
+ default_encoding = sys.getdefaultencoding()
+ try:
+ ostype = subprocess.check_output(
+ ['uname', '-s']).strip().decode(default_encoding)
+ except subprocess.CalledProcessError:
+ return False
+ except OSError as reason:
+ if getattr(reason, 'winerror', None) is not None:
+ return False
+ raise reason
+
+ if ostype != "Linux":
+ return False
+
+ # If the user has asked binaries to be patched for Nix, then
+ # don't check for NixOS or `/lib`.
+ if self.get_toml("patch-binaries-for-nix", "build") == "true":
+ return True