depot/third_party/nixpkgs/pkgs/by-name/sn/snapcraft/os-platform.patch
Default email 587713944a Project import generated by Copybara.
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
2024-04-21 17:54:59 +02:00

21 lines
651 B
Diff

diff --git a/snapcraft/utils.py b/snapcraft/utils.py
index 511effe2..4af5a029 100644
--- a/snapcraft/utils.py
+++ b/snapcraft/utils.py
@@ -15,6 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""Utilities for snapcraft."""
+
import multiprocessing
import os
import pathlib
@@ -91,7 +92,7 @@ def get_os_platform(
release = platform.release()
machine = platform.machine()
- if system == "Linux":
+ if system == "Linux" and "NixOS" not in platform.version():
try:
with filepath.open("rt", encoding="utf-8") as release_file:
lines = release_file.readlines()