summary refs log tree commit diff
path: root/pkgs/os-specific/linux
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-08-14 09:12:16 +0100
committerSergei Trofimovich <slyich@gmail.com>2022-08-14 09:17:48 +0100
commit8940dd0559f0f6a14b4ef174f0a3c7538bbed69e (patch)
tree3e05b4d6107bd85fb5cf9aa85a116d419508824f /pkgs/os-specific/linux
parentb20fe0805d898eacea5a6e263a795fec845ba077 (diff)
downloadnixpkgs-8940dd0559f0f6a14b4ef174f0a3c7538bbed69e.tar
nixpkgs-8940dd0559f0f6a14b4ef174f0a3c7538bbed69e.tar.gz
nixpkgs-8940dd0559f0f6a14b4ef174f0a3c7538bbed69e.tar.bz2
nixpkgs-8940dd0559f0f6a14b4ef174f0a3c7538bbed69e.tar.lz
nixpkgs-8940dd0559f0f6a14b4ef174f0a3c7538bbed69e.tar.xz
nixpkgs-8940dd0559f0f6a14b4ef174f0a3c7538bbed69e.tar.zst
nixpkgs-8940dd0559f0f6a14b4ef174f0a3c7538bbed69e.zip
linuxPackages.perf: move from perf.nix to perf/ directory
While at it dropped top-level 'with lib;'.
Diffstat (limited to 'pkgs/os-specific/linux')
-rw-r--r--pkgs/os-specific/linux/kernel/perf/5.19-binutils-2.39-support.patch (renamed from pkgs/os-specific/linux/kernel/5.19-binutils-2.39-support.patch)0
-rw-r--r--pkgs/os-specific/linux/kernel/perf/default.nix (renamed from pkgs/os-specific/linux/kernel/perf.nix)14
2 files changed, 5 insertions, 9 deletions
diff --git a/pkgs/os-specific/linux/kernel/5.19-binutils-2.39-support.patch b/pkgs/os-specific/linux/kernel/perf/5.19-binutils-2.39-support.patch
index 5f4f2fc0b4a..5f4f2fc0b4a 100644
--- a/pkgs/os-specific/linux/kernel/5.19-binutils-2.39-support.patch
+++ b/pkgs/os-specific/linux/kernel/perf/5.19-binutils-2.39-support.patch
diff --git a/pkgs/os-specific/linux/kernel/perf.nix b/pkgs/os-specific/linux/kernel/perf/default.nix
index 199c12b8e24..d481eea7e75 100644
--- a/pkgs/os-specific/linux/kernel/perf.nix
+++ b/pkgs/os-specific/linux/kernel/perf/default.nix
@@ -7,15 +7,13 @@
 , withLibcap ? true, libcap
 }:
 
-with lib;
-
 stdenv.mkDerivation {
   pname = "perf-linux";
   version = kernel.version;
 
   inherit (kernel) src;
 
-  patches = optionals (versionAtLeast kernel.version "5.19" && versionOlder kernel.version "5.20") [
+  patches = lib.optionals (lib.versionAtLeast kernel.version "5.19" && lib.versionOlder kernel.version "5.20") [
     # binutils-2.39 support around init_disassemble_info()
     # API change.
     # Will be included in 5.20.
@@ -50,12 +48,10 @@ stdenv.mkDerivation {
     elfutils newt slang libunwind libbfd zlib openssl systemtap.stapBuild numactl
     libopcodes python3 perl
   ] ++ lib.optional withGtk gtk2
-    ++ (if (versionAtLeast kernel.version "4.19") then [ python3 ] else [ python2 ])
+    ++ (if (lib.versionAtLeast kernel.version "4.19") then [ python3 ] else [ python2 ])
     ++ lib.optional withZstd zstd
     ++ lib.optional withLibcap libcap;
 
-  # Note: we don't add elfutils to buildInputs, since it provides a
-  # bad `ld' and other stuff.
   NIX_CFLAGS_COMPILE = toString [
     "-Wno-error=cpp"
     "-Wno-error=bool-compare"
@@ -79,11 +75,11 @@ stdenv.mkDerivation {
       --prefix PATH : "${binutils-unwrapped}/bin"
   '';
 
-  meta = {
+  meta = with lib; {
     homepage = "https://perf.wiki.kernel.org/";
     description = "Linux tools to profile with performance counters";
-    maintainers = with lib.maintainers; [viric];
-    platforms = with lib.platforms; linux;
+    maintainers = with maintainers; [ viric ];
+    platforms = platforms.linux;
     broken = kernel.kernelOlder "5";
   };
 }