push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,69 @@
{
lib,
stdenv,
buildPackages,
fetchurl,
pkg-config,
libbfd,
popt,
zlib,
linuxHeaders,
libiberty_static,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "oprofile";
version = "1.4.0";
src = fetchurl {
url = "mirror://sourceforge/oprofile/${finalAttrs.pname}-${finalAttrs.version}.tar.gz";
sha256 = "04m46ni0ryk4sqmzd6mahwzp7iwhwqzfbmfi42fki261sycnz83v";
};
patches = [
# fix configurePhase with gcc14:
# https://sourceforge.net/p/oprofile/oprofile/ci/b0acf9f0c0aac93bf6f3e196d7a52c9632ff4475/
./fix-autoconf-detection-of-perf_events.patch
];
postPatch = ''
substituteInPlace opjitconv/opjitconv.c \
--replace-fail "/bin/rm" "${buildPackages.coreutils}/bin/rm" \
--replace-fail "/bin/cp" "${buildPackages.coreutils}/bin/cp"
'';
nativeBuildInputs = [ pkg-config ];
buildInputs = [
libbfd
zlib
popt
linuxHeaders
libiberty_static
];
configureFlags = [
"--with-kernel=${linuxHeaders}"
"--disable-shared" # needed because only the static libbfd is available
];
meta = {
description = "System-wide profiler for Linux";
longDescription = ''
OProfile is a system-wide profiler for Linux systems, capable of
profiling all running code at low overhead. It consists of a
kernel driver and a daemon for collecting sample data, and
several post-profiling tools for turning data into information.
OProfile leverages the hardware performance counters of the CPU
to enable profiling of a wide variety of interesting statistics,
which can also be used for basic time-spent profiling. All code
is profiled: hardware and software interrupt handlers, kernel
modules, the kernel, shared libraries, and applications.
'';
license = lib.licenses.gpl2;
homepage = "http://oprofile.sourceforge.net/";
platforms = lib.platforms.linux;
maintainers = [ ];
};
})

View File

@@ -0,0 +1,12 @@
diff --git a/configure b/configure
index cf36d5ea43..bb59613ef6 100755
--- a/configure
+++ b/configure
@@ -17215,6 +17215,7 @@
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <linux/perf_event.h>
+ #include <unistd.h>
#include <asm/unistd.h>
#include <sys/types.h>
#include <string.h>

View File

@@ -0,0 +1,37 @@
{
stdenv,
lib,
meson,
ninja,
sysprof,
}:
stdenv.mkDerivation {
pname = "libsysprof-capture";
inherit (sysprof) src version;
nativeBuildInputs = [
meson
ninja
];
mesonFlags = [
"-Dsysprofd=none"
"-Dgtk=false"
"-Dlibsysprof=false"
"-Dhelp=false"
"-Dtools=false"
"-Dtests=false"
"-Dexamples=false"
"-Dpolkit-agent=disabled" # only useful for sysprof-cli
"-Ddebuginfod=disabled"
];
meta = sysprof.meta // {
description = "Static library for Sysprof capture data generation";
license = lib.licenses.bsd2Patent;
platforms = lib.platforms.all;
pkgConfigModules = [ "sysprof-capture-4" ];
};
}

View File

@@ -0,0 +1,93 @@
{
stdenv,
lib,
desktop-file-utils,
fetchurl,
elfutils,
gettext,
glib,
gtk4,
json-glib,
itstool,
libadwaita,
libdex,
libpanel,
libunwind,
libxml2,
meson,
ninja,
pkg-config,
polkit,
shared-mime-info,
systemd,
wrapGAppsHook4,
gnome,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "sysprof";
version = "48.0";
outputs = [
"out"
"lib"
"dev"
];
src = fetchurl {
url = "mirror://gnome/sources/sysprof/${lib.versions.major finalAttrs.version}/sysprof-${finalAttrs.version}.tar.xz";
hash = "sha256-Gw8DgPLzBwi6h4KTIaBv7h2zbfqHeXu/B/CnrPRJjRg=";
};
nativeBuildInputs = [
desktop-file-utils
gettext
itstool
libxml2
meson
ninja
pkg-config
shared-mime-info
wrapGAppsHook4
];
buildInputs = [
elfutils
glib
gtk4
json-glib
polkit
systemd
libadwaita
libdex
libpanel
libunwind
];
mesonFlags = [
"-Dsystemdunitdir=lib/systemd/system"
# In a separate libsysprof-capture package
"-Dinstall-static=false"
];
passthru = {
updateScript = gnome.updateScript {
packageName = "sysprof";
};
};
meta = with lib; {
description = "System-wide profiler for Linux";
homepage = "https://gitlab.gnome.org/GNOME/sysprof";
longDescription = ''
Sysprof is a sampling CPU profiler for Linux that uses the perf_event_open
system call to profile the entire system, not just a single
application. Sysprof handles shared libraries and applications
do not need to be recompiled. In fact they don't even have to
be restarted.
'';
license = licenses.gpl3Plus;
teams = [ teams.gnome ];
platforms = platforms.unix;
};
})

View File

@@ -0,0 +1,57 @@
{
lib,
runCommand,
makeWrapper,
systemtap-unwrapped,
elfutils,
kernel,
gnumake,
python3,
nixosTests,
withStap ? true, # avoid cyclic dependency with glib, reduce closure size substantially
}:
let
inherit (kernel) stdenv;
## symlink farm for --sysroot flag
sysroot = runCommand "systemtap-sysroot-${kernel.version}" { } ''
mkdir -p $out/boot $out/usr/lib/debug
ln -s ${kernel.dev}/vmlinux ${kernel.dev}/lib $out
ln -s ${kernel.dev}/vmlinux $out/usr/lib/debug
ln -s ${kernel}/System.map $out/boot/System.map-${kernel.version}
'';
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;
}
(
''
mkdir -p $out/bin
for bin in $stapBuild/bin/*; do
ln -s $bin $out/bin
done
rm $out/bin/stap $out/bin/dtrace
makeWrapper $stapBuild/bin/dtrace $out/bin/dtrace \
--prefix PYTHONPATH : ${pypkgs}
''
+ lib.optionalString withStap ''
makeWrapper $stapBuild/bin/stap $out/bin/stap \
--add-flags "--sysroot ${sysroot}" \
--prefix PATH : ${
lib.makeBinPath [
stdenv.cc.cc
stdenv.cc.bintools
elfutils
gnumake
]
}
''
)