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.

Changed files
+47 -39
pkgs
by-name
sy
systemtap-unwrapped
development
tools
profiling
systemtap
os-specific
linux
kernel
+41
pkgs/by-name/sy/systemtap-unwrapped/package.nix
···
···
+
{
+
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;
+
};
+
})
+4 -37
pkgs/development/tools/profiling/systemtap/default.nix
···
{
lib,
-
fetchgit,
-
pkg-config,
-
gettext,
runCommand,
makeWrapper,
-
cpio,
elfutils,
kernel,
gnumake,
···
}:
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
···
pypkgs = with python3.pkgs; makePythonPath [ pyparsing ];
in
-
runCommand "systemtap-${version}"
{
-
inherit stapBuild;
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;
-
};
}
(
''
···
{
lib,
runCommand,
makeWrapper,
+
systemtap-unwrapped,
elfutils,
kernel,
gnumake,
···
}:
let
inherit (kernel) stdenv;
## symlink farm for --sysroot flag
sysroot = runCommand "systemtap-sysroot-${kernel.version}" { } ''
mkdir -p $out/boot $out/usr/lib/debug
···
pypkgs = with python3.pkgs; makePythonPath [ pyparsing ];
in
+
runCommand "systemtap-${systemtap-unwrapped.version}"
{
+
stapBuild = systemtap-unwrapped;
nativeBuildInputs = [ makeWrapper ];
passthru.tests = { inherit (nixosTests.systemtap) linux_default linux_latest; };
+
inherit (systemtap-unwrapped) meta;
}
(
''
+2 -2
pkgs/os-specific/linux/kernel/perf/default.nix
···
libpfm,
libtraceevent,
openssl,
-
systemtap,
numactl,
zlib,
babeltrace,
···
libopcodes_2_38
]
)
-
++ lib.optional (lib.meta.availableOn stdenv.hostPlatform systemtap) systemtap.stapBuild
++ lib.optional withGtk gtk2
++ lib.optional withZstd zstd
++ lib.optional withLibcap libcap
···
libpfm,
libtraceevent,
openssl,
+
systemtap-unwrapped,
numactl,
zlib,
babeltrace,
···
libopcodes_2_38
]
)
+
++ lib.optional (lib.meta.availableOn stdenv.hostPlatform systemtap-unwrapped) systemtap-unwrapped
++ lib.optional withGtk gtk2
++ lib.optional withZstd zstd
++ lib.optional withLibcap libcap