diff --git a/pkgs/by-name/sy/systemtap-unwrapped/package.nix b/pkgs/by-name/sy/systemtap-unwrapped/package.nix new file mode 100644 index 000000000000..22109e888eff --- /dev/null +++ b/pkgs/by-name/sy/systemtap-unwrapped/package.nix @@ -0,0 +1,41 @@ +{ + lib, + stdenv, + fetchgit, + pkg-config, + gettext, + cpio, + elfutils, + python3, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "systemtap"; + version = "5.2"; + + src = fetchgit { + url = "git://sourceware.org/git/systemtap.git"; + rev = "release-${finalAttrs.version}"; + hash = "sha256-SUPNarZW8vdK9hQaI2kU+rfKWIPiXB4BvJvRNC1T9tU="; + }; + + nativeBuildInputs = [ + pkg-config + cpio + python3 + python3.pkgs.setuptools + ]; + buildInputs = [ + elfutils + gettext + python3 + ]; + enableParallelBuilding = true; + + meta = { + homepage = "https://sourceware.org/systemtap/"; + description = "Provides a scripting language for instrumentation on a live kernel plus user-space"; + license = lib.licenses.gpl2; + platforms = lib.systems.inspect.patterns.isGnu; + }; +}) diff --git a/pkgs/development/tools/profiling/systemtap/default.nix b/pkgs/development/tools/profiling/systemtap/default.nix index 7f52af9b4b34..20a9d6d5d862 100644 --- a/pkgs/development/tools/profiling/systemtap/default.nix +++ b/pkgs/development/tools/profiling/systemtap/default.nix @@ -1,11 +1,8 @@ { lib, - fetchgit, - pkg-config, - gettext, runCommand, makeWrapper, - cpio, + systemtap-unwrapped, elfutils, kernel, gnumake, @@ -15,33 +12,8 @@ }: let - ## fetchgit info - url = "git://sourceware.org/git/systemtap.git"; - rev = "release-${version}"; - hash = "sha256-SUPNarZW8vdK9hQaI2kU+rfKWIPiXB4BvJvRNC1T9tU="; - version = "5.2"; - inherit (kernel) stdenv; - ## stap binaries - stapBuild = stdenv.mkDerivation { - pname = "systemtap"; - inherit version; - src = fetchgit { inherit url rev hash; }; - nativeBuildInputs = [ - pkg-config - cpio - python3 - python3.pkgs.setuptools - ]; - buildInputs = [ - elfutils - gettext - python3 - ]; - enableParallelBuilding = true; - }; - ## symlink farm for --sysroot flag sysroot = runCommand "systemtap-sysroot-${kernel.version}" { } '' mkdir -p $out/boot $out/usr/lib/debug @@ -53,17 +25,12 @@ let pypkgs = with python3.pkgs; makePythonPath [ pyparsing ]; in -runCommand "systemtap-${version}" +runCommand "systemtap-${systemtap-unwrapped.version}" { - inherit stapBuild; + stapBuild = systemtap-unwrapped; nativeBuildInputs = [ makeWrapper ]; passthru.tests = { inherit (nixosTests.systemtap) linux_default linux_latest; }; - meta = { - homepage = "https://sourceware.org/systemtap/"; - description = "Provides a scripting language for instrumentation on a live kernel plus user-space"; - license = lib.licenses.gpl2; - platforms = lib.systems.inspect.patterns.isGnu; - }; + inherit (systemtap-unwrapped) meta; } ( '' diff --git a/pkgs/os-specific/linux/kernel/perf/default.nix b/pkgs/os-specific/linux/kernel/perf/default.nix index 81e6fb47d838..e5743bc6b4eb 100644 --- a/pkgs/os-specific/linux/kernel/perf/default.nix +++ b/pkgs/os-specific/linux/kernel/perf/default.nix @@ -27,7 +27,7 @@ libpfm, libtraceevent, openssl, - systemtap, + systemtap-unwrapped, numactl, zlib, babeltrace, @@ -150,7 +150,7 @@ stdenv.mkDerivation { libopcodes_2_38 ] ) - ++ lib.optional (lib.meta.availableOn stdenv.hostPlatform systemtap) systemtap.stapBuild + ++ lib.optional (lib.meta.availableOn stdenv.hostPlatform systemtap-unwrapped) systemtap-unwrapped ++ lib.optional withGtk gtk2 ++ lib.optional withZstd zstd ++ lib.optional withLibcap libcap