From 94b5fbe5e78ac9b61ef2d24b043e44366513d9b2 Mon Sep 17 00:00:00 2001 From: David Guibert Date: Mon, 8 Feb 2021 21:01:33 +0100 Subject: [PATCH] perf: define only if kernel version > 3.12 In mobile-nixos, some vendor kernels might be old. Without this patch, the evaluation of the system fails by the assert inside the perf derivation. --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3bf82e86c9d..1e0eae88ecc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20394,7 +20394,7 @@ in oci-seccomp-bpf-hook = if lib.versionAtLeast kernel.version "5.4" then callPackage ../os-specific/linux/oci-seccomp-bpf-hook { } else null; - perf = callPackage ../os-specific/linux/kernel/perf.nix { }; + perf = if lib.versionAtLeast kernel.version "3.12" then callPackage ../os-specific/linux/kernel/perf.nix { } else null; phc-intel = if lib.versionAtLeast kernel.version "4.10" then callPackage ../os-specific/linux/phc-intel { } else null;