depot/third_party/nixpkgs/pkgs/by-name/sn/snapcraft/os-platform.patch
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

13 lines
473 B
Diff

diff --git a/snapcraft/utils.py b/snapcraft/utils.py
index 999a64ec..4f38b4cd 100644
--- a/snapcraft/utils.py
+++ b/snapcraft/utils.py
@@ -94,7 +94,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()