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 1 { 2 2 lib, 3 - fetchgit, 4 - pkg-config, 5 - gettext, 6 3 runCommand, 7 4 makeWrapper, 8 - cpio, 5 + systemtap-unwrapped, 9 6 elfutils, 10 7 kernel, 11 8 gnumake, ··· 15 12 }: 16 13 17 14 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 15 inherit (kernel) stdenv; 25 16 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 17 ## symlink farm for --sysroot flag 46 18 sysroot = runCommand "systemtap-sysroot-${kernel.version}" { } '' 47 19 mkdir -p $out/boot $out/usr/lib/debug ··· 53 25 pypkgs = with python3.pkgs; makePythonPath [ pyparsing ]; 54 26 55 27 in 56 - runCommand "systemtap-${version}" 28 + runCommand "systemtap-${systemtap-unwrapped.version}" 57 29 { 58 - inherit stapBuild; 30 + stapBuild = systemtap-unwrapped; 59 31 nativeBuildInputs = [ makeWrapper ]; 60 32 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 - }; 33 + inherit (systemtap-unwrapped) meta; 67 34 } 68 35 ( 69 36 ''
+2 -2
pkgs/os-specific/linux/kernel/perf/default.nix
··· 27 27 libpfm, 28 28 libtraceevent, 29 29 openssl, 30 - systemtap, 30 + systemtap-unwrapped, 31 31 numactl, 32 32 zlib, 33 33 babeltrace, ··· 150 150 libopcodes_2_38 151 151 ] 152 152 ) 153 - ++ lib.optional (lib.meta.availableOn stdenv.hostPlatform systemtap) systemtap.stapBuild 153 + ++ lib.optional (lib.meta.availableOn stdenv.hostPlatform systemtap-unwrapped) systemtap-unwrapped 154 154 ++ lib.optional withGtk gtk2 155 155 ++ lib.optional withZstd zstd 156 156 ++ lib.optional withLibcap libcap