lol

systemtap-unwrapped: extract from linuxPackages

This doesn't depend on a kernel version, and it's depended on by other
tools that don't depend on a kernel version. They shouldn't have to
reach into linuxPackages for an arbitrary kernel version to get it.

+47 -39
+41
pkgs/by-name/sy/systemtap-unwrapped/package.nix
···
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchgit, 5 + pkg-config, 6 + gettext, 7 + cpio, 8 + elfutils, 9 + python3, 10 + }: 11 + 12 + stdenv.mkDerivation (finalAttrs: { 13 + pname = "systemtap"; 14 + version = "5.2"; 15 + 16 + src = fetchgit { 17 + url = "git://sourceware.org/git/systemtap.git"; 18 + rev = "release-${finalAttrs.version}"; 19 + hash = "sha256-SUPNarZW8vdK9hQaI2kU+rfKWIPiXB4BvJvRNC1T9tU="; 20 + }; 21 + 22 + nativeBuildInputs = [ 23 + pkg-config 24 + cpio 25 + python3 26 + python3.pkgs.setuptools 27 + ]; 28 + buildInputs = [ 29 + elfutils 30 + gettext 31 + python3 32 + ]; 33 + enableParallelBuilding = true; 34 + 35 + meta = { 36 + homepage = "https://sourceware.org/systemtap/"; 37 + description = "Provides a scripting language for instrumentation on a live kernel plus user-space"; 38 + license = lib.licenses.gpl2; 39 + platforms = lib.systems.inspect.patterns.isGnu; 40 + }; 41 + })
+4 -37
pkgs/development/tools/profiling/systemtap/default.nix
··· 1 { 2 lib, 3 - fetchgit, 4 - pkg-config, 5 - gettext, 6 runCommand, 7 makeWrapper, 8 - cpio, 9 elfutils, 10 kernel, 11 gnumake, ··· 15 }: 16 17 let 18 - ## fetchgit info 19 - url = "git://sourceware.org/git/systemtap.git"; 20 - rev = "release-${version}"; 21 - hash = "sha256-SUPNarZW8vdK9hQaI2kU+rfKWIPiXB4BvJvRNC1T9tU="; 22 - version = "5.2"; 23 - 24 inherit (kernel) stdenv; 25 26 - ## stap binaries 27 - stapBuild = stdenv.mkDerivation { 28 - pname = "systemtap"; 29 - inherit version; 30 - src = fetchgit { inherit url rev hash; }; 31 - nativeBuildInputs = [ 32 - pkg-config 33 - cpio 34 - python3 35 - python3.pkgs.setuptools 36 - ]; 37 - buildInputs = [ 38 - elfutils 39 - gettext 40 - python3 41 - ]; 42 - enableParallelBuilding = true; 43 - }; 44 - 45 ## symlink farm for --sysroot flag 46 sysroot = runCommand "systemtap-sysroot-${kernel.version}" { } '' 47 mkdir -p $out/boot $out/usr/lib/debug ··· 53 pypkgs = with python3.pkgs; makePythonPath [ pyparsing ]; 54 55 in 56 - runCommand "systemtap-${version}" 57 { 58 - inherit stapBuild; 59 nativeBuildInputs = [ makeWrapper ]; 60 passthru.tests = { inherit (nixosTests.systemtap) linux_default linux_latest; }; 61 - meta = { 62 - homepage = "https://sourceware.org/systemtap/"; 63 - description = "Provides a scripting language for instrumentation on a live kernel plus user-space"; 64 - license = lib.licenses.gpl2; 65 - platforms = lib.systems.inspect.patterns.isGnu; 66 - }; 67 } 68 ( 69 ''
··· 1 { 2 lib, 3 runCommand, 4 makeWrapper, 5 + systemtap-unwrapped, 6 elfutils, 7 kernel, 8 gnumake, ··· 12 }: 13 14 let 15 inherit (kernel) stdenv; 16 17 ## symlink farm for --sysroot flag 18 sysroot = runCommand "systemtap-sysroot-${kernel.version}" { } '' 19 mkdir -p $out/boot $out/usr/lib/debug ··· 25 pypkgs = with python3.pkgs; makePythonPath [ pyparsing ]; 26 27 in 28 + runCommand "systemtap-${systemtap-unwrapped.version}" 29 { 30 + stapBuild = systemtap-unwrapped; 31 nativeBuildInputs = [ makeWrapper ]; 32 passthru.tests = { inherit (nixosTests.systemtap) linux_default linux_latest; }; 33 + inherit (systemtap-unwrapped) meta; 34 } 35 ( 36 ''
+2 -2
pkgs/os-specific/linux/kernel/perf/default.nix
··· 27 libpfm, 28 libtraceevent, 29 openssl, 30 - systemtap, 31 numactl, 32 zlib, 33 babeltrace, ··· 150 libopcodes_2_38 151 ] 152 ) 153 - ++ lib.optional (lib.meta.availableOn stdenv.hostPlatform systemtap) systemtap.stapBuild 154 ++ lib.optional withGtk gtk2 155 ++ lib.optional withZstd zstd 156 ++ lib.optional withLibcap libcap
··· 27 libpfm, 28 libtraceevent, 29 openssl, 30 + systemtap-unwrapped, 31 numactl, 32 zlib, 33 babeltrace, ··· 150 libopcodes_2_38 151 ] 152 ) 153 + ++ lib.optional (lib.meta.availableOn stdenv.hostPlatform systemtap-unwrapped) systemtap-unwrapped 154 ++ lib.optional withGtk gtk2 155 ++ lib.optional withZstd zstd 156 ++ lib.optional withLibcap libcap