about summary refs log tree commit diff
path: root/pkgs/tools/system/osquery/platform-nixos.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/system/osquery/platform-nixos.patch')
-rw-r--r--pkgs/tools/system/osquery/platform-nixos.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/pkgs/tools/system/osquery/platform-nixos.patch b/pkgs/tools/system/osquery/platform-nixos.patch
new file mode 100644
index 000000000000..7e1afcb640b3
--- /dev/null
+++ b/pkgs/tools/system/osquery/platform-nixos.patch
@@ -0,0 +1,22 @@
+diff --git a/tools/get_platform.py b/tools/get_platform.py
+index 3dd34516..f53ca83a 100644
+--- a/tools/get_platform.py
++++ b/tools/get_platform.py
+@@ -26,6 +26,8 @@ DEBIAN_VERSION = "/etc/debian_version"
+ GENTOO_RELEASE = "/etc/gentoo-release"
+ 
+ def _platform():
++    return ("nixos", "nixos")
++
+     osType, _, _, _, _, _ = platform.uname()
+ 
+     if osType == "Windows":
+@@ -75,6 +77,8 @@ def _platform():
+         return (None, osType.lower())
+ 
+ def _distro(osType):
++    return "unknown_version"
++
+     def getRedhatDistroVersion(pattern):
+         with open(SYSTEM_RELEASE, "r") as fd:
+             contents = fd.read()