depot/pkgs/by-name/sn/snapcraft/os-platform.patch
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00: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()