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,64 @@
{
lib,
buildPythonApplication,
fetchFromGitHub,
atk,
gobject-introspection,
wrapGAppsHook3,
click,
hidapi,
psutil,
pygobject3,
udevCheckHook,
stdenv,
}:
buildPythonApplication rec {
pname = "cm-rgb";
version = "0.3.6";
format = "setuptools";
src = fetchFromGitHub {
owner = "gfduszynski";
repo = pname;
rev = "v${version}";
sha256 = "sha256-m0ZAjSLRzcjzygLEbvCiDd7krc1gRqTg1ZV4H/o2c68=";
};
nativeBuildInputs = [
atk
# Populate GI_TYPELIB_PATH
gobject-introspection
wrapGAppsHook3
udevCheckHook
];
propagatedBuildInputs = [
click
hidapi
psutil
pygobject3
];
postInstall = ''
mkdir -p $out/etc/udev/rules.d
echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="2516", ATTR{idProduct}=="0051", TAG+="uaccess"' \
> $out/etc/udev/rules.d/60-cm-rgb.rules
'';
meta = with lib; {
description = "Control AMD Wraith Prism RGB LEDs";
longDescription = ''
cm-rgb controls AMD Wraith Prism RGB LEDS.
To permit non-root accounts to use this utility on
NixOS, add this package to <literal>services.udev.packages</literal>
in <filename>configuration.nix</filename>.
'';
homepage = "https://github.com/gfduszynski/cm-rgb";
license = licenses.mit;
platforms = platforms.all;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,14 @@
{ stdenv, collectd }:
stdenv.mkDerivation {
pname = "collectd-data";
inherit (collectd) meta src version;
dontConfigure = true;
dontBuild = true;
dontFixup = true;
installPhase = ''
install -Dm444 -t $out/share/collectd/ src/*.{db,conf}
'';
}

View File

@@ -0,0 +1,93 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
callPackage,
autoreconfHook,
pkg-config,
libtool,
bison,
flex,
perl,
nixosTests,
...
}@args:
let
plugins = callPackage ./plugins.nix args;
in
stdenv.mkDerivation (finalAttrs: {
pname = "collectd";
version = "5.12.0";
src = fetchFromGitHub {
owner = "collectd";
repo = "collectd";
tag = "collectd-${finalAttrs.version}";
hash = "sha256-UTlCY1GPRpbdQFLFUDjNr1PgEdGv4WNtjr8TYbxHK5A=";
};
# All of these are going to be included in the next release
patches = [
# fix -t never printing syntax errors
# should be included in next release
(fetchpatch {
name = "fix-broken-dash-t-option.patch";
url = "https://github.com/collectd/collectd/commit/3f575419e7ccb37a3b10ecc82adb2e83ff2826e1.patch";
hash = "sha256-XkDxLITmG0FLpgf8Ut1bDqulM4DmPs8Xrec2QB1tkks=";
})
(fetchpatch {
name = "no_include_longintrepr.patch";
url = "https://github.com/collectd/collectd/commit/623e95394e0e62e7f9ced2104b786d21e9c0bf53.patch";
hash = "sha256-0eD7yNW3TWVyNMpLsADhYFDvy6COoCaI0kS1XJrwDgM=";
})
];
nativeBuildInputs = [
pkg-config
autoreconfHook
bison
flex
perl # for pod2man
];
buildInputs = [
libtool
]
++ plugins.buildInputs;
configureFlags = [
"--localstatedir=/var"
"--disable-werror"
]
++ plugins.configureFlags
++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "--with-fp-layout=nothing" ];
# Used in `src/virt.c`
env.NIX_CFLAGS_COMPILE = "-DATTRIBUTE_UNUSED=__attribute__((unused))";
# do not create directories in /var during installPhase
postConfigure = ''
substituteInPlace Makefile --replace-fail '$(mkinstalldirs) $(DESTDIR)$(localstatedir)/' '#'
'';
postInstall = ''
if [ -d $out/share/collectd/java ]; then
mv $out/share/collectd/java $out/share/
fi
'';
enableParallelBuilding = true;
passthru.tests = {
inherit (nixosTests) collectd;
};
meta = {
description = "Daemon which collects system performance statistics periodically";
homepage = "https://collectd.org";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ bjornfor ];
};
})

View File

@@ -0,0 +1,201 @@
{
lib,
stdenv,
curl,
hiredis,
iptables,
jdk,
libatasmart,
libdbi,
libesmtp,
libgcrypt,
libmemcached,
cyrus_sasl,
libmodbus,
libmicrohttpd,
libmnl,
libmysqlclient,
libnotify,
gdk-pixbuf,
liboping,
libpcap,
libpq,
libsigrok,
libvirt,
libxml2,
lua,
lvm2,
lm_sensors,
mongoc,
mosquitto,
net-snmp,
openldap,
openipmi,
perl,
protobufc,
python3,
rabbitmq-c,
rdkafka,
riemann_c_client,
rrdtool,
udev,
varnish,
xen,
yajl,
# Defaults to `null` for all supported plugins (except xen, which is marked as
# insecure), otherwise a list of plugin names for a custom build
enabledPlugins ? null,
...
}:
let
# Plugins that have dependencies.
# Please help to extend these!
plugins = {
amqp.buildInputs = [
yajl
]
++ lib.optionals stdenv.hostPlatform.isLinux [ rabbitmq-c ];
apache.buildInputs = [ curl ];
ascent.buildInputs = [
curl
libxml2
];
bind.buildInputs = [
curl
libxml2
];
ceph.buildInputs = [ yajl ];
curl.buildInputs = [ curl ];
curl_json.buildInputs = [
curl
yajl
];
curl_xml.buildInputs = [
curl
libxml2
];
dbi.buildInputs = [ libdbi ];
disk.buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
udev
];
dns.buildInputs = [ libpcap ];
ipmi.buildInputs = [ openipmi ];
iptables.buildInputs = [
libpcap
]
++ lib.optionals stdenv.hostPlatform.isLinux [
iptables
libmnl
];
java.buildInputs = [
jdk
libgcrypt
libxml2
];
log_logstash.buildInputs = [ yajl ];
lua.buildInputs = [ lua ];
memcachec.buildInputs = [
libmemcached
cyrus_sasl
];
modbus.buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libmodbus ];
mqtt.buildInputs = [ mosquitto ];
mysql.buildInputs = lib.optionals (libmysqlclient != null) [
libmysqlclient
];
netlink.buildInputs = [
libpcap
]
++ lib.optionals stdenv.hostPlatform.isLinux [
libmnl
];
network.buildInputs = [ libgcrypt ];
nginx.buildInputs = [ curl ];
notify_desktop.buildInputs = [
libnotify
gdk-pixbuf
];
notify_email.buildInputs = [ libesmtp ];
openldap.buildInputs = [ openldap ];
ovs_events.buildInputs = [ yajl ];
ovs_stats.buildInputs = [ yajl ];
perl.buildInputs = [ perl ];
pinba.buildInputs = [ protobufc ];
ping.buildInputs = [ liboping ];
postgresql.buildInputs = [ libpq ];
python.buildInputs = [ python3 ];
redis.buildInputs = [ hiredis ];
rrdcached.buildInputs = [
rrdtool
libxml2
];
rrdtool.buildInputs = [
rrdtool
libxml2
];
sensors.buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ lm_sensors ];
sigrok.buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
libsigrok
udev
];
smart.buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
libatasmart
udev
];
snmp.buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ net-snmp ];
snmp_agent.buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ net-snmp ];
varnish.buildInputs = [
curl
varnish
];
virt.buildInputs = [
libvirt
libxml2
yajl
]
++ lib.optionals stdenv.hostPlatform.isLinux [
lvm2
udev
];
write_http.buildInputs = [
curl
yajl
];
write_kafka.buildInputs = [
yajl
rdkafka
];
write_log.buildInputs = [ yajl ];
write_mongodb.buildInputs = [ mongoc ];
write_prometheus.buildInputs = [
protobufc
libmicrohttpd
];
write_redis.buildInputs = [ hiredis ];
write_riemann.buildInputs = [
protobufc
riemann_c_client
];
xencpu.buildInputs = [ xen ];
};
configureFlags = lib.optionals (enabledPlugins != null) (
[ "--disable-all-plugins" ] ++ (map (plugin: "--enable-${plugin}") enabledPlugins)
);
pluginBuildInputs =
plugin:
lib.optionals (
plugins ? ${plugin} && plugins.${plugin} ? buildInputs
) plugins.${plugin}.buildInputs;
buildInputs =
if enabledPlugins == null then
builtins.concatMap pluginBuildInputs (builtins.attrNames (removeAttrs plugins [ "xencpu" ]))
else
builtins.concatMap pluginBuildInputs enabledPlugins;
in
{
inherit configureFlags buildInputs;
}

View File

@@ -0,0 +1,158 @@
{
lib,
stdenv,
fetchFromGitHub,
makeWrapper,
makePerlPath,
# Perl libraries
LWP,
LWPProtocolHttps,
HTTPMessage,
HTTPDate,
URI,
TryTiny,
# Required
coreutils,
curl, # Preferred to using the Perl HTTP libs - according to hw-probe.
dmidecode,
gnugrep,
gnutar,
hwinfo,
iproute2,
kmod,
pciutils,
perl,
smartmontools,
usbutils,
v4l-utils,
xz,
# Conditionally recommended
systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd,
systemd,
# Recommended
withRecommended ? true, # Install recommended tools
mcelog,
hdparm,
acpica-tools,
drm_info,
mesa-demos,
memtester,
sysstat,
cpuid,
util-linuxMinimal,
xinput,
libva-utils,
inxi,
vulkan-tools,
i2c-tools,
opensc,
# Suggested
withSuggested ? false, # Install (most) suggested tools
hplip,
sane-backends,
# , pnputils # pnputils (lspnp) isn't currently in nixpkgs and appears to be poorly maintained
}:
stdenv.mkDerivation rec {
pname = "hw-probe";
version = "1.6.6";
src = fetchFromGitHub {
owner = "linuxhw";
repo = pname;
rev = version;
sha256 = "sha256-8dLfk2k7xG2CXMHfMPrpgq43j3ttj5a0bgNPEahl2rQ=";
};
makeFlags = [ "prefix=$(out)" ];
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ perl ];
makeWrapperArgs =
let
requiredPrograms = [
hwinfo
dmidecode
smartmontools
pciutils
usbutils
iproute2 # (ip)
coreutils # (sort)
gnugrep
curl
gnutar
v4l-utils
xz
kmod # (lsmod)
];
recommendedPrograms = [
mcelog
hdparm
acpica-tools
drm_info
mesa-demos
memtester
sysstat # (iostat)
util-linuxMinimal # (rfkill)
xinput
libva-utils # (vainfo)
inxi
vulkan-tools
i2c-tools
opensc
]
# cpuid is only compatible with i686 and x86_64
++ lib.optional (lib.elem stdenv.hostPlatform.system cpuid.meta.platforms) cpuid;
conditionallyRecommendedPrograms = lib.optional systemdSupport systemd; # (systemd-analyze)
suggestedPrograms = [
hplip # (hp-probe)
sane-backends # (sane-find-scanner)
# pnputils # (lspnp)
];
programs =
requiredPrograms
++ conditionallyRecommendedPrograms
++ lib.optionals withRecommended recommendedPrograms
++ lib.optionals withSuggested suggestedPrograms;
in
[
"--set"
"PERL5LIB"
"${makePerlPath [
LWP
LWPProtocolHttps
HTTPMessage
URI
HTTPDate
TryTiny
]}"
"--prefix"
"PATH"
":"
"${lib.makeBinPath programs}"
];
postInstall = ''
wrapProgram $out/bin/hw-probe \
$makeWrapperArgs
'';
meta = with lib; {
description = "Probe for hardware, check operability and find drivers";
homepage = "https://github.com/linuxhw/hw-probe";
platforms = with platforms; (linux ++ freebsd ++ netbsd ++ openbsd);
license = with licenses; [
lgpl21
bsdOriginal
];
maintainers = with maintainers; [ rehno-lindeque ];
mainProgram = "hw-probe";
};
}

View File

@@ -0,0 +1,64 @@
{
stdenv,
lib,
fetchFromGitiles,
libcap,
installShellFiles,
}:
stdenv.mkDerivation rec {
pname = "minijail";
version = "2025.07.02";
src = fetchFromGitiles {
url = "https://chromium.googlesource.com/chromiumos/platform/minijail";
rev = "linux-v${version}";
sha256 = "sha256-GRnr2O6ZpWtRDGJ6Am0XPT426Xh7wxTJsoEqyTUECYY=";
};
buildInputs = [ libcap ];
nativeBuildInputs = [ installShellFiles ];
makeFlags = [
"ECHO=echo"
"LIBDIR=$(out)/lib"
];
postPatch = ''
substituteInPlace Makefile --replace /bin/echo echo
patchShebangs platform2_preinstall.sh
'';
# causes redefinition of _FORTIFY_SOURCE
hardeningDisable = [ "fortify3" ];
installPhase = ''
./platform2_preinstall.sh ${version} $out/include/chromeos
mkdir -p $out/lib/pkgconfig $out/include/chromeos $out/bin \
$out/share/minijail
cp -v *.so $out/lib
cp -v *.pc $out/lib/pkgconfig
cp -v libminijail.h scoped_minijail.h $out/include/chromeos
cp -v minijail0 $out/bin
installManPage minijail0.1 minijail0.5
'';
enableParallelBuilding = true;
meta = with lib; {
homepage = "https://chromium.googlesource.com/chromiumos/platform/minijail/+/refs/heads/main/README.md";
description = "Sandboxing library and application using Linux namespaces and capabilities";
changelog = "https://chromium.googlesource.com/chromiumos/platform/minijail/+/refs/tags/linux-v${version}";
license = licenses.bsd3;
maintainers = with maintainers; [
pcarrier
qyliss
];
platforms = platforms.linux;
mainProgram = "minijail0";
};
}

View File

@@ -0,0 +1,47 @@
{
lib,
buildPythonApplication,
pkgsBuildTarget,
python,
minijail,
}:
let
targetClang = pkgsBuildTarget.targetPackages.clangStdenv.cc;
in
buildPythonApplication {
format = "setuptools";
pname = "minijail-tools";
inherit (minijail) version src;
postPatch = ''
substituteInPlace Makefile --replace /bin/echo echo
'';
postConfigure = ''
substituteInPlace tools/compile_seccomp_policy.py \
--replace "'constants.json'" "'$out/share/constants.json'"
'';
preBuild = ''
make libconstants.gen.c libsyscalls.gen.c
${targetClang}/bin/${targetClang.targetPrefix}cc -S -emit-llvm \
libconstants.gen.c libsyscalls.gen.c
${python.pythonOnBuildForHost.interpreter} tools/generate_constants_json.py \
--output constants.json \
libconstants.gen.ll libsyscalls.gen.ll
'';
postInstall = ''
mkdir -p $out/share
cp -v constants.json $out/share/constants.json
'';
meta = with lib; {
homepage = "https://android.googlesource.com/platform/external/minijail/+/refs/heads/master/tools/";
description = "Set of tools for minijail";
license = licenses.asl20;
inherit (minijail.meta) maintainers platforms;
};
}

View File

@@ -0,0 +1,35 @@
diff --git a/packaging/cmake/Modules/NetdataDashboard.cmake b/packaging/cmake/Modules/NetdataDashboard.cmake
index 098eaffcf..e52375bd0 100644
--- a/packaging/cmake/Modules/NetdataDashboard.cmake
+++ b/packaging/cmake/Modules/NetdataDashboard.cmake
@@ -26,29 +26,12 @@ function(bundle_dashboard)
set(dashboard_src_dir "${CMAKE_BINARY_DIR}/dashboard-src")
set(dashboard_src_prefix "${dashboard_src_dir}/dist/agent")
set(dashboard_bin_dir "${CMAKE_BINARY_DIR}/dashboard-bin")
- set(DASHBOARD_URL "https://app.netdata.cloud/agent.tar.gz" CACHE STRING
- "URL used to fetch the local agent dashboard code")
message(STATUS "Preparing local agent dashboard code")
- message(STATUS " Fetching ${DASHBOARD_URL}")
- file(DOWNLOAD
- "${DASHBOARD_URL}"
- "${CMAKE_BINARY_DIR}/dashboard.tar.gz"
- TIMEOUT 180
- STATUS fetch_status)
-
- list(GET fetch_status 0 result)
-
- if(result)
- message(FATAL_ERROR "Failed to fetch dashboard code")
- else()
- message(STATUS " Fetching ${DASHBOARD_URL} -- Done")
- endif()
-
message(STATUS " Extracting dashboard code")
extract_gzipped_tarball(
- "${CMAKE_BINARY_DIR}/dashboard.tar.gz"
+ "@dashboardTarball@"
"${dashboard_src_dir}"
)
message(STATUS " Extracting dashboard code -- Done")

View File

@@ -0,0 +1,334 @@
{
bash,
bison,
buildGoModule,
cmake,
cups,
curl,
dlib,
fetchFromGitHub,
fetchurl,
flex,
freeipmi,
go,
google-cloud-cpp,
grpc,
jemalloc,
json_c,
lib,
libbacktrace,
libbpf,
libcap,
libelf,
libmnl,
libnetfilter_acct,
libossp_uuid,
libuuid,
libuv,
libyaml,
lm_sensors,
lz4,
makeWrapper,
ninja,
nixosTests,
openssl,
pkg-config,
protobuf,
replaceVars,
snappy,
stdenv,
systemd,
zlib,
withCloudUi ? false,
withConnPrometheus ? false,
withConnPubSub ? false,
withCups ? false,
withDBengine ? true,
withDebug ? false,
withEbpf ? false,
withIpmi ? stdenv.hostPlatform.isLinux,
withLibbacktrace ? true,
withML ? true,
withNdsudo ? false,
withNetfilter ? stdenv.hostPlatform.isLinux,
withNetworkViewer ? stdenv.hostPlatform.isLinux,
withSsl ? true,
withSystemdJournal ? stdenv.hostPlatform.isLinux,
withSystemdUnits ? stdenv.hostPlatform.isLinux,
}:
stdenv.mkDerivation (finalAttrs: {
version = "2.6.3";
pname = "netdata";
src = fetchFromGitHub {
owner = "netdata";
repo = "netdata";
rev = "v${finalAttrs.version}";
hash = "sha256-J6QHeukhtHHLx92NGtoOmPwq6gvL9eyVYBQiDD1cEDk=";
fetchSubmodules = true;
};
strictDeps = true;
nativeBuildInputs = [
bison
cmake
flex
go
makeWrapper
ninja
pkg-config
]
++ lib.optionals withCups [ cups.dev ];
# bash is only used to rewrite shebangs
buildInputs = [
bash
curl
jemalloc
json_c
libuv
libyaml
lz4
protobuf
zlib
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
libossp_uuid
]
++ lib.optionals (stdenv.hostPlatform.isLinux) [
libcap
libuuid
lm_sensors
]
++ lib.optionals withConnPrometheus [ snappy ]
++ lib.optionals withConnPubSub [
google-cloud-cpp
grpc
]
++ lib.optionals withCups [ cups ]
++ lib.optionals withEbpf [
libbpf
libelf
]
++ lib.optionals withIpmi [ freeipmi ]
++ lib.optionals withLibbacktrace [ libbacktrace ]
++ lib.optionals withNetfilter [
libmnl
libnetfilter_acct
]
++ lib.optionals withSsl [ openssl ]
++ lib.optionals withSystemdJournal [ systemd ]
++ lib.optionals withSystemdUnits [ systemd ];
patches = [
# Allow ndsudo to use non-hardcoded `PATH`
# See https://github.com/netdata/netdata/pull/17377#issuecomment-2183017868
# https://github.com/netdata/netdata/security/advisories/GHSA-pmhq-4cxq-wj93
./ndsudo-fix-path.patch
./use-local-libbacktrace.patch
]
++ lib.optional withCloudUi (
replaceVars ./dashboard-v3-add.patch {
# FIXME web.archive.org link can be replace once https://github.com/netdata/netdata-cloud/issues/1081 resolved
# last update 04/01/2025 04:45:14
dashboardTarball = fetchurl {
url = "https://web.archive.org/web/20250401044514/https://app.netdata.cloud/agent.tar.gz";
hash = "sha256-NtmM1I3VrvFErMoBl+w63Nt0DzOOsaB98cxE/axm8mE=";
};
}
);
# Guard against unused build-time development inputs in closure. Without
# the ./skip-CONFIGURE_COMMAND.patch patch the closure retains inputs up
# to bootstrap tools:
# https://github.com/NixOS/nixpkgs/pull/175719
# We pick zlib.dev as a simple canary package with pkg-config input.
disallowedReferences = lib.optional (!withDebug) zlib.dev;
donStrip = withDebug || withLibbacktrace;
env.NIX_CFLAGS_COMPILE = lib.optionalString withDebug "-O1 -ggdb -DNETDATA_INTERNAL_CHECKS=1";
postInstall = ''
# Relocate one folder above.
mv $out/usr/* $out/
''
+ lib.optionalString (stdenv.hostPlatform.isLinux) ''
# rename this plugin so netdata will look for setuid wrapper
mv $out/libexec/netdata/plugins.d/apps.plugin \
$out/libexec/netdata/plugins.d/apps.plugin.org
mv $out/libexec/netdata/plugins.d/cgroup-network \
$out/libexec/netdata/plugins.d/cgroup-network.org
mv $out/libexec/netdata/plugins.d/perf.plugin \
$out/libexec/netdata/plugins.d/perf.plugin.org
mv $out/libexec/netdata/plugins.d/slabinfo.plugin \
$out/libexec/netdata/plugins.d/slabinfo.plugin.org
mv $out/libexec/netdata/plugins.d/debugfs.plugin \
$out/libexec/netdata/plugins.d/debugfs.plugin.org
${lib.optionalString withIpmi ''
mv $out/libexec/netdata/plugins.d/freeipmi.plugin \
$out/libexec/netdata/plugins.d/freeipmi.plugin.org
''}
${lib.optionalString withNdsudo ''
mv $out/libexec/netdata/plugins.d/ndsudo \
$out/libexec/netdata/plugins.d/ndsudo.org
ln -s /var/lib/netdata/ndsudo/ndsudo $out/libexec/netdata/plugins.d/ndsudo
''}
${lib.optionalString withNetworkViewer ''
mv $out/libexec/netdata/plugins.d/network-viewer.plugin \
$out/libexec/netdata/plugins.d/network-viewer.plugin.org
''}
${lib.optionalString withSystemdJournal ''
mv $out/libexec/netdata/plugins.d/systemd-journal.plugin \
$out/libexec/netdata/plugins.d/systemd-journal.plugin.org
''}
${lib.optionalString withSystemdUnits ''
mv $out/libexec/netdata/plugins.d/systemd-units.plugin \
$out/libexec/netdata/plugins.d/systemd-units.plugin.org
''}
'';
preConfigure = ''
export GOCACHE=$TMPDIR/go-cache
export GOPATH=$TMPDIR/go
export GOSUMDB=off
substituteInPlace packaging/cmake/Modules/NetdataGoTools.cmake \
--replace-fail \
'GOPROXY=https://proxy.golang.org' \
'GOPROXY=file://${finalAttrs.passthru.netdata-go-modules},file://${finalAttrs.passthru.nd-mcp}'
# Prevent the path to be caught into the Nix store path.
substituteInPlace CMakeLists.txt \
--replace-fail 'set(CACHE_DIR "''${NETDATA_RUNTIME_PREFIX}/var/cache/netdata")' 'set(CACHE_DIR "/var/cache/netdata")' \
--replace-fail 'set(CONFIG_DIR "''${NETDATA_RUNTIME_PREFIX}/etc/netdata")' 'set(CONFIG_DIR "/etc/netdata")' \
--replace-fail 'set(LIBCONFIG_DIR "''${NETDATA_RUNTIME_PREFIX}/usr/lib/netdata/conf.d")' 'set(LIBCONFIG_DIR "${placeholder "out"}/share/netdata/conf.d")' \
--replace-fail 'set(LOG_DIR "''${NETDATA_RUNTIME_PREFIX}/var/log/netdata")' 'set(LOG_DIR "/var/log/netdata")' \
--replace-fail 'set(PLUGINS_DIR "''${NETDATA_RUNTIME_PREFIX}/usr/libexec/netdata/plugins.d")' 'set(PLUGINS_DIR "${placeholder "out"}/libexec/netdata/plugins.d")' \
--replace-fail 'set(VARLIB_DIR "''${NETDATA_RUNTIME_PREFIX}/var/lib/netdata")' 'set(VARLIB_DIR "/var/lib/netdata")' \
--replace-fail 'set(pkglibexecdir_POST "''${NETDATA_RUNTIME_PREFIX}/usr/libexec/netdata")' 'set(pkglibexecdir_POST "${placeholder "out"}/libexec/netdata")' \
--replace-fail 'set(localstatedir_POST "''${NETDATA_RUNTIME_PREFIX}/var")' 'set(localstatedir_POST "/var")' \
--replace-fail 'set(sbindir_POST "''${NETDATA_RUNTIME_PREFIX}/''${BINDIR}")' 'set(sbindir_POST "${placeholder "out"}/bin")' \
--replace-fail 'set(configdir_POST "''${NETDATA_RUNTIME_PREFIX}/etc/netdata")' 'set(configdir_POST "/etc/netdata")' \
--replace-fail 'set(libconfigdir_POST "''${NETDATA_RUNTIME_PREFIX}/usr/lib/netdata/conf.d")' 'set(libconfigdir_POST "${placeholder "out"}/share/netdata/conf.d")' \
--replace-fail 'set(cachedir_POST "''${NETDATA_RUNTIME_PREFIX}/var/cache/netdata")' 'set(libconfigdir_POST "/var/cache/netdata")' \
--replace-fail 'set(registrydir_POST "''${NETDATA_RUNTIME_PREFIX}/var/lib/netdata/registry")' 'set(registrydir_POST "/var/lib/netdata/registry")' \
--replace-fail 'set(varlibdir_POST "''${NETDATA_RUNTIME_PREFIX}/var/lib/netdata")' 'set(varlibdir_POST "/var/lib/netdata")' \
--replace-fail 'set(BUILD_INFO_CMAKE_CACHE_ARCHIVE_PATH "usr/share/netdata")' 'set(BUILD_INFO_CMAKE_CACHE_ARCHIVE_PATH "${placeholder "out"}/share/netdata")'
'';
cmakeFlags = [
"-DWEB_DIR=share/netdata/web"
(lib.cmakeBool "ENABLE_DASHBOARD" withCloudUi)
(lib.cmakeBool "ENABLE_DBENGINE" withDBengine)
(lib.cmakeBool "ENABLE_EXPORTER_PROMETHEUS_REMOTE_WRITE" withConnPrometheus)
(lib.cmakeBool "ENABLE_JEMALLOC" true)
(lib.cmakeBool "ENABLE_LIBBACKTRACE" withLibbacktrace)
(lib.cmakeBool "ENABLE_ML" withML)
(lib.cmakeBool "ENABLE_PLUGIN_CUPS" withCups)
(lib.cmakeBool "ENABLE_PLUGIN_EBPF" withEbpf)
(lib.cmakeBool "ENABLE_PLUGIN_FREEIPMI" withIpmi)
(lib.cmakeBool "ENABLE_PLUGIN_NETWORK_VIEWER" withNetworkViewer)
(lib.cmakeBool "ENABLE_PLUGIN_SYSTEMD_JOURNAL" withSystemdJournal)
(lib.cmakeBool "ENABLE_PLUGIN_SYSTEMD_UNITS" withSystemdUnits)
(lib.cmakeBool "ENABLE_PLUGIN_XENSTAT" false)
# Suggested by upstream.
"-G Ninja"
]
++ lib.optional withML "-DNETDATA_DLIB_SOURCE_PATH=${dlib.src}";
postFixup = ''
wrapProgram $out/bin/netdata-claim.sh --prefix PATH : ${lib.makeBinPath [ openssl ]}
wrapProgram $out/libexec/netdata/plugins.d/cgroup-network-helper.sh --prefix PATH : ${lib.makeBinPath [ bash ]}
wrapProgram $out/bin/netdatacli --set NETDATA_PIPENAME /run/netdata/ipc
${lib.optionalString (stdenv.hostPlatform.isLinux) ''
substituteInPlace $out/lib/netdata/conf.d/go.d/sensors.conf --replace-fail '/usr/bin/sensors' '${lm_sensors}/bin/sensors'
''}
# Time to cleanup the output directory.
unlink $out/sbin
cp $out/etc/netdata/edit-config $out/bin/netdata-edit-config
mv $out/lib/netdata/conf.d $out/share/netdata/conf.d
rm -rf $out/{var,usr,etc}
'';
enableParallelBuilding = true;
passthru = rec {
nd-mcp =
(buildGoModule {
pname = "nd-mcp";
version = finalAttrs.version;
inherit (finalAttrs) src;
sourceRoot = "${finalAttrs.src.name}/src/web/mcp/bridges/stdio-golang";
vendorHash = "sha256-6JfHrBloJQ5wHyogIPTVDZjlITWZXbsv2m2lMlQmBUY=";
proxyVendor = true;
doCheck = false;
subPackages = [ "." ];
ldflags = [
"-s"
"-w"
];
meta = {
description = "Netdata Model Context Protocol (MCP) Integration";
license = lib.licenses.gpl3Only;
};
}).goModules;
netdata-go-modules =
(buildGoModule {
pname = "netdata-go-plugins";
inherit (finalAttrs) version src;
sourceRoot = "${finalAttrs.src.name}/src/go/plugin/go.d";
vendorHash = "sha256-aOFmfBcBjnTfFHfMNemSJHbnMnhBojYrGe21zDxPxME=";
doCheck = false;
proxyVendor = true;
ldflags = [
"-s"
"-w"
"-X main.version=${finalAttrs.version}"
];
passthru.tests = tests;
meta = finalAttrs.meta // {
description = "Netdata orchestrator for data collection modules written in Go";
mainProgram = "godplugin";
license = lib.licenses.gpl3Only;
};
}).goModules;
inherit
withIpmi
withNdsudo
withNetworkViewer
withSystemdJournal
;
tests.netdata = nixosTests.netdata;
};
meta = with lib; {
broken = stdenv.buildPlatform != stdenv.hostPlatform || withEbpf;
description = "Real-time performance monitoring tool";
homepage = "https://www.netdata.cloud/";
changelog = "https://github.com/netdata/netdata/releases/tag/v${version}";
license = [ licenses.gpl3Plus ] ++ lib.optionals withCloudUi [ licenses.ncul1 ];
mainProgram = "netdata";
platforms = platforms.unix;
maintainers = with maintainers; [
mkg20001
rhoriguchi
];
};
})

View File

@@ -0,0 +1,18 @@
# See https://github.com/netdata/netdata/pull/17377#issuecomment-2183017868
# https://github.com/netdata/netdata/security/advisories/GHSA-pmhq-4cxq-wj93
diff --git a/src/collectors/utils/ndsudo.c b/src/collectors/utils/ndsudo.c
index d53ca9f28..b42a121bf 100644
--- a/src/collectors/utils/ndsudo.c
+++ b/src/collectors/utils/ndsudo.c
@@ -357,9 +357,9 @@ int main(int argc, char *argv[]) {
return 3;
}
- char new_path[] = "PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin";
+ char new_path[] = "PATH=/var/lib/netdata/ndsudo/runtime-dependencies";
putenv(new_path);
setuid(0);
setgid(0);
setegid(0);

View File

@@ -0,0 +1,34 @@
--- a/CMakeLists.txt 2025-03-29 00:48:23.397111607 +0100
+++ b/CMakeLists.txt 2025-03-29 00:45:42.296199537 +0100
@@ -501,10 +501,6 @@
message(STATUS "Added compiler and linker flags for better stack trace support")
endif()
-if(ENABLE_LIBBACKTRACE)
- netdata_bundle_libbacktrace()
-endif()
-
#
# check source compilation
#
@@ -2183,8 +2179,10 @@
"$<$<BOOL:${LINK_LIBM}>:m>"
"${SYSTEMD_LDFLAGS}")
-if(HAVE_LIBBACKTRACE)
- netdata_add_libbacktrace_to_target(libnetdata)
+if(ENABLE_LIBBACKTRACE AND HAVE_LIBBACKTRACE)
+ target_link_libraries(libnetdata ${LIBBACKTRACE_LIBRARIES})
+ target_include_directories(libnetdata PUBLIC ${LIBBACKTRACE_INCLUDE_DIRS})
+ target_compile_options(libnetdata PUBLIC ${LIBBACKTRACE_CFLAGS_OTHER})
endif()
if(OS_WINDOWS)
--- /dev/null
+++ b/pkgs/tools/system/netdata/use-local-libbacktrace.patch
@@ -0,0 +1,5 @@
+FIND_PATH(LIBBACKTRACE_INCLUDE_DIR NAMES backtrace.h)
+FIND_LIBRARY(LIBBACKTRACE_LIBRARIES NAMES libbacktrace)
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBBACKTRACE DEFAULT_MSG LIBBACKTRACE_LIBRARIES LIBBACKTRACE_INCLUDE_DIR)

View File

@@ -0,0 +1,71 @@
{
stdenv,
lib,
fetchFromGitHub,
cmake,
qtbase,
wrapQtAppsHook,
makeDesktopItem,
copyDesktopItems,
}:
let
# Based in desktop files from official packages:
# https://github.com/congard/nvidia-system-monitor-qt/tree/master/package
desktopItem = makeDesktopItem {
name = "nvidia-system-monitor-qt";
desktopName = "NVIDIA System Monitor";
icon = "qnvsm";
exec = "qnvsm";
categories = [
"System"
"Utility"
"Qt"
];
};
in
stdenv.mkDerivation rec {
pname = "nvidia-system-monitor-qt";
version = "1.6-1";
src = fetchFromGitHub {
owner = "congard";
repo = "nvidia-system-monitor-qt";
rev = "v${version}";
sha256 = "sha256-JHK7idyk5UxgDyt+SzvYjTLmlNzx6+Z+OPYsRD4NWPg=";
};
buildInputs = [ qtbase ];
nativeBuildInputs = [
cmake
wrapQtAppsHook
copyDesktopItems
];
cmakeFlags = [
"-DIconPath=${placeholder "out"}/share/icons/hicolor/512x512/apps/qnvsm.png"
"-DVersionPrefix=(Nixpkgs)"
];
installPhase = ''
runHook preInstall
install -Dm755 qnvsm $out/bin/qnvsm
install -Dm644 $src/icon.png $out/share/icons/hicolor/512x512/apps/qnvsm.png
runHook postInstall
'';
desktopItems = [ desktopItem ];
meta = rec {
description = "Task Manager for Linux for NVIDIA graphics cards";
homepage = "https://github.com/congard/nvidia-system-monitor-qt";
downloadPage = "${homepage}/releases";
changelog = "${downloadPage}/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ hacker1024 ];
mainProgram = "qnvsm";
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,120 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
gtest,
cudatoolkit,
libdrm,
ncurses,
testers,
udev,
apple-sdk_12,
addDriverRunpath,
amd ? false,
intel ? false,
msm ? false,
nvidia ? false,
apple ? false,
panfrost ? false,
panthor ? false,
ascend ? false,
v3d ? false,
tpu ? false,
}:
let
drm-postFixup = ''
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${
lib.makeLibraryPath [
libdrm
ncurses
udev
]
}" \
$out/bin/nvtop
'';
needDrm = (amd || msm || panfrost || panthor || intel);
in
stdenv.mkDerivation (finalAttrs: {
pname = "nvtop";
version = "3.2.0";
# between generation of multiple update PRs for each package flavor and manual updates I choose manual updates
# nixpkgs-update: no auto update
src = fetchFromGitHub {
owner = "Syllo";
repo = "nvtop";
rev = finalAttrs.version;
hash = "sha256-8iChT55L2NSnHg8tLIry0rgi/4966MffShE0ib+2ywc=";
};
cmakeFlags = with lib.strings; [
(cmakeBool "BUILD_TESTING" true)
(cmakeBool "USE_LIBUDEV_OVER_LIBSYSTEMD" true)
(cmakeBool "AMDGPU_SUPPORT" amd)
(cmakeBool "NVIDIA_SUPPORT" nvidia)
(cmakeBool "INTEL_SUPPORT" intel)
(cmakeBool "APPLE_SUPPORT" apple)
(cmakeBool "MSM_SUPPORT" msm)
(cmakeBool "PANFROST_SUPPORT" panfrost)
(cmakeBool "PANTHOR_SUPPORT" panthor)
(cmakeBool "ASCEND_SUPPORT" ascend)
(cmakeBool "V3D_SUPPORT" v3d)
(cmakeBool "TPU_SUPPORT" tpu) # requires libtpuinfo which is not packaged yet
];
nativeBuildInputs = [
cmake
]
++ lib.optionals finalAttrs.doCheck [
gtest
]
++ lib.optional nvidia addDriverRunpath;
buildInputs = [
ncurses
]
++ lib.optional stdenv.hostPlatform.isLinux udev
++ lib.optional stdenv.hostPlatform.isDarwin apple-sdk_12
++ lib.optional nvidia cudatoolkit
++ lib.optional needDrm libdrm;
# this helps cmake to find <drm.h>
env.NIX_CFLAGS_COMPILE = lib.optionalString needDrm "-isystem ${lib.getDev libdrm}/include/libdrm";
# ordering of fixups is important
postFixup =
(lib.optionalString needDrm drm-postFixup)
+ (lib.optionalString nvidia "addDriverRunpath $out/bin/nvtop");
# https://github.com/Syllo/nvtop/commit/33ec008e26a00227a666ccb11321e9971a50daf8
doCheck = !stdenv.hostPlatform.isDarwin;
passthru = {
tests.version = testers.testVersion {
inherit (finalAttrs) version;
package = finalAttrs.finalPackage;
command = "nvtop --version";
};
};
meta = with lib; {
description = "htop-like task monitor for AMD, Adreno, Intel and NVIDIA GPUs";
longDescription = ''
Nvtop stands for Neat Videocard TOP, a (h)top like task monitor for AMD, Adreno, Intel and NVIDIA GPUs.
It can handle multiple GPUs and print information about them in a htop familiar way.
'';
homepage = "https://github.com/Syllo/nvtop";
changelog = "https://github.com/Syllo/nvtop/releases/tag/${finalAttrs.version}";
license = licenses.gpl3Only;
platforms = if apple then platforms.darwin else platforms.linux;
maintainers = with maintainers; [
gbtb
anthonyroussel
moni
];
mainProgram = "nvtop";
};
})

View File

@@ -0,0 +1,40 @@
{ callPackage, stdenv }:
let
# this GPU families are supported "by-default" upstream (see https://github.com/Syllo/nvtop/blob/3a69c2d060298cd6f92cb09db944eded98be1c23/CMakeLists.txt#L81)
# coincidentally, these families are also easy to build in nixpkgs at the moment
defaultGPUFamilies = [
"amd"
"apple"
"intel"
"msm"
"nvidia"
"panfrost"
"panthor"
"v3d"
];
# these GPU families are partially supported upstream, they are also tricky to build in nixpkgs
# volunteers with specific hardware needed to build and test these package variants
additionalGPUFamilies = [
"ascend"
"tpu"
];
defaultSupport = builtins.listToAttrs (
# apple can only build on darwin, and it can't build everything else, and vice versa
map (gpu: {
name = gpu;
value =
(gpu == "apple" && stdenv.buildPlatform.isDarwin && stdenv.hostPlatform == stdenv.buildPlatform)
|| (gpu != "apple" && stdenv.buildPlatform.isLinux);
}) defaultGPUFamilies
);
in
{
full = callPackage ./build-nvtop.nix defaultSupport; # this package supports all default GPU families
}
# additional packages with only one specific GPU family support
// builtins.listToAttrs (
map (gpu: {
name = gpu;
value = (callPackage ./build-nvtop.nix { "${gpu}" = true; });
}) defaultGPUFamilies
)

View File

@@ -0,0 +1,147 @@
{
lib,
stdenv,
fetchFromGitHub,
fontconfig,
freetype,
libX11,
libXext,
libXt,
xorgproto,
perl, # For building web manuals
which,
ed,
DarwinTools, # For building on Darwin
}:
stdenv.mkDerivation rec {
pname = "plan9port";
version = "2025-01-29";
src = fetchFromGitHub {
owner = "9fans";
repo = pname;
rev = "a5d6857a3b912b43c88ef298c28d13d4623f9ef0";
sha256 = "0c23z56zygrsyr96ml7907mpfgx80vnsy99nqr3nmfw1a045mjgv";
};
postPatch = ''
substituteInPlace bin/9c \
--replace 'which uniq' '${which}/bin/which uniq'
ed -sE INSTALL <<EOF
# get /bin:/usr/bin out of PATH
/^PATH=[^ ]*/s,,PATH=\$PATH:\$PLAN9/bin,
# no xcbuild nonsense
/^if.* = Darwin/+;/^fi/-c
${"\t"}export NPROC=$NIX_BUILD_CORES
.
# remove absolute include paths from fontsrv test
/cc -o a.out -c -I.*freetype2/;/x11.c/j
s/(-Iinclude).*-I[^ ]*/\1/
wq
EOF
'';
nativeBuildInputs = [ ed ];
buildInputs = [
perl
which
]
++ (
if !stdenv.hostPlatform.isDarwin then
[
fontconfig
freetype # fontsrv uses these
libX11
libXext
libXt
xorgproto
]
else
[
DarwinTools
]
);
configurePhase = ''
runHook preConfigure
cat >LOCAL.config <<EOF
CC9='$(command -v $CC)'
CFLAGS='$NIX_CFLAGS_COMPILE'
LDFLAGS='$(for f in $NIX_LDFLAGS; do echo "-Wl,$f"; done | xargs echo)'
${lib.optionalString (!stdenv.hostPlatform.isDarwin) "X11='${libXt.dev}/include'"}
EOF
# make '9' available in the path so there's some way to find out $PLAN9
cat >LOCAL.INSTALL <<EOF
#!$out/plan9/bin/rc
mkdir $out/bin
ln -s $out/plan9/bin/9 $out/bin/
EOF
chmod +x LOCAL.INSTALL
# now, not in fixupPhase, so ./INSTALL works
patchShebangs .
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
PLAN9_TARGET=$out/plan9 ./INSTALL -b
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir $out
cp -r . $out/plan9
cd $out/plan9
./INSTALL -c
runHook postInstall
'';
dontPatchShebangs = true;
doInstallCheck = true;
installCheckPhase = ''
$out/bin/9 rc -c 'echo rc is working.'
# 9l can find and use its libs
cd $TMP
cat >test.c <<EOF
#include <u.h>
#include <libc.h>
#include <thread.h>
void
threadmain(int argc, char **argv)
{
threadexitsall(nil);
}
EOF
$out/bin/9 9c -o test.o test.c
$out/bin/9 9l -o test test.o
./test
'';
meta = with lib; {
homepage = "https://9fans.github.io/plan9port/";
description = "Plan 9 from User Space";
longDescription = ''
Plan 9 from User Space (aka plan9port) is a port of many Plan 9 programs
from their native Plan 9 environment to Unix-like operating systems.
'';
license = licenses.mit;
maintainers = with maintainers; [
bbarker
ftrvxmtrx
kovirobi
matthewdargan
ylh
];
mainProgram = "9";
platforms = platforms.unix;
};
}
# TODO: investigate the mouse chording support patch

View File

@@ -0,0 +1,196 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
autoreconfHook,
libestr,
json_c,
zlib,
docutils,
fastJson,
withKrb5 ? true,
libkrb5,
withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd,
systemd,
withJemalloc ? true,
jemalloc,
withMysql ? true,
libmysqlclient,
withPostgres ? true,
libpq,
withDbi ? true,
libdbi,
withNetSnmp ? true,
net-snmp,
withUuid ? true,
libuuid,
withCurl ? true,
curl,
withGnutls ? true,
gnutls,
withGcrypt ? true,
libgcrypt,
withLognorm ? true,
liblognorm,
withMaxminddb ? true,
libmaxminddb,
withOpenssl ? true,
openssl,
withRelp ? true,
librelp,
withKsi ? true,
libksi,
withLogging ? true,
liblogging,
withNet ? true,
libnet,
withHadoop ? true,
hadoop,
withRdkafka ? true,
rdkafka,
withMongo ? true,
mongoc,
withCzmq ? true,
czmq,
withRabbitmq ? true,
rabbitmq-c,
withHiredis ? true,
hiredis,
nixosTests,
}:
stdenv.mkDerivation rec {
pname = "rsyslog";
version = "8.2508.0";
src = fetchurl {
url = "https://www.rsyslog.com/files/download/rsyslog/${pname}-${version}.tar.gz";
hash = "sha256-yJsedNNtDKSpW3Shq+Nu0LH6rIt8i+RxqEFc+ndiBv0=";
};
nativeBuildInputs = [
pkg-config
autoreconfHook
docutils
];
buildInputs = [
fastJson
libestr
json_c
zlib
]
++ lib.optional withKrb5 libkrb5
++ lib.optional withJemalloc jemalloc
++ lib.optional withPostgres libpq
++ lib.optional withDbi libdbi
++ lib.optional withNetSnmp net-snmp
++ lib.optional withUuid libuuid
++ lib.optional withCurl curl
++ lib.optional withGnutls gnutls
++ lib.optional withGcrypt libgcrypt
++ lib.optional withLognorm liblognorm
++ lib.optional withOpenssl openssl
++ lib.optional withRelp librelp
++ lib.optional withKsi libksi
++ lib.optional withLogging liblogging
++ lib.optional withNet libnet
++ lib.optional withHadoop hadoop
++ lib.optional withRdkafka rdkafka
++ lib.optionals withMongo [ mongoc ]
++ lib.optional withCzmq czmq
++ lib.optional withRabbitmq rabbitmq-c
++ lib.optional withHiredis hiredis
++ lib.optional withMaxminddb libmaxminddb
++ lib.optional withMysql libmysqlclient
++ lib.optional withSystemd systemd;
configureFlags = [
"--sysconfdir=/etc"
"--localstatedir=/var"
"--with-systemdsystemunitdir=\${out}/etc/systemd/system"
(lib.enableFeature true "largefile")
(lib.enableFeature true "regexp")
(lib.enableFeature withKrb5 "gssapi-krb5")
(lib.enableFeature true "klog")
(lib.enableFeature true "kmsg")
(lib.enableFeature withSystemd "imjournal")
(lib.enableFeature true "inet")
(lib.enableFeature withJemalloc "jemalloc")
(lib.enableFeature true "unlimited-select")
(lib.enableFeature withCurl "clickhouse")
(lib.enableFeature false "debug")
(lib.enableFeature false "debug-symbols")
(lib.enableFeature true "debugless")
(lib.enableFeature false "valgrind")
(lib.enableFeature false "diagtools")
(lib.enableFeature withCurl "fmhttp")
(lib.enableFeature true "usertools")
(lib.enableFeature withMysql "mysql")
(lib.enableFeature withPostgres "pgsql")
(lib.enableFeature withDbi "libdbi")
(lib.enableFeature withNetSnmp "snmp")
(lib.enableFeature withUuid "uuid")
(lib.enableFeature withCurl "elasticsearch")
(lib.enableFeature withGnutls "gnutls")
(lib.enableFeature withGcrypt "libgcrypt")
(lib.enableFeature true "rsyslogrt")
(lib.enableFeature true "rsyslogd")
(lib.enableFeature true "mail")
(lib.enableFeature withLognorm "mmnormalize")
(lib.enableFeature withMaxminddb "mmdblookup")
(lib.enableFeature true "mmjsonparse")
(lib.enableFeature true "mmaudit")
(lib.enableFeature true "mmanon")
(lib.enableFeature true "mmutf8fix")
(lib.enableFeature true "mmcount")
(lib.enableFeature true "mmsequence")
(lib.enableFeature true "mmfields")
(lib.enableFeature true "mmpstrucdata")
(lib.enableFeature withOpenssl "mmrfc5424addhmac")
(lib.enableFeature withRelp "relp")
(lib.enableFeature withKsi "ksi-ls12")
(lib.enableFeature withLogging "liblogging-stdlog")
(lib.enableFeature withLogging "rfc3195")
(lib.enableFeature true "imfile")
(lib.enableFeature false "imsolaris")
(lib.enableFeature true "imptcp")
(lib.enableFeature true "impstats")
(lib.enableFeature true "omprog")
(lib.enableFeature withNet "omudpspoof")
(lib.enableFeature true "omstdout")
(lib.enableFeature withSystemd "omjournal")
(lib.enableFeature true "pmlastmsg")
(lib.enableFeature true "pmcisconames")
(lib.enableFeature true "pmciscoios")
(lib.enableFeature true "pmaixforwardedfrom")
(lib.enableFeature true "pmsnare")
(lib.enableFeature true "omruleset")
(lib.enableFeature true "omuxsock")
(lib.enableFeature true "mmsnmptrapd")
(lib.enableFeature withHadoop "omhdfs")
(lib.enableFeature withRdkafka "omkafka")
(lib.enableFeature withMongo "ommongodb")
(lib.enableFeature withCzmq "imczmq")
(lib.enableFeature withCzmq "omczmq")
(lib.enableFeature withRabbitmq "omrabbitmq")
(lib.enableFeature withHiredis "omhiredis")
(lib.enableFeature withCurl "omhttp")
(lib.enableFeature true "generate-man-pages")
];
passthru.tests = {
nixos-rsyslogd = nixosTests.rsyslogd;
};
meta = {
homepage = "https://www.rsyslog.com/";
description = "Enhanced syslog implementation";
mainProgram = "rsyslogd";
changelog = "https://raw.githubusercontent.com/rsyslog/rsyslog/v${version}/ChangeLog";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.linux;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,54 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
qtcharts,
qttools,
wrapQtAppsHook,
}:
stdenv.mkDerivation rec {
pname = "stacer";
version = "1.1.0";
src = fetchFromGitHub {
owner = "oguzhaninan";
repo = pname;
rev = "v${version}";
sha256 = "0qndzzkbq6abapvwq202kva8j619jdn9977sbqmmfs9zkjz4mbsd";
};
postPatch = ''
substituteInPlace stacer/Managers/app_manager.cpp \
--replace 'qApp->applicationDirPath() + "/translations"' \
'QStandardPaths::locate(QStandardPaths::AppDataLocation, "translations", QStandardPaths::LocateDirectory)'
'';
buildInputs = [
qtcharts
qttools
];
nativeBuildInputs = [
cmake
wrapQtAppsHook
];
preConfigure = ''
lrelease stacer/stacer.pro
'';
postInstall = ''
install -Dm644 ../translations/*.qm -t $out/share/stacer/translations
'';
meta = with lib; {
description = "Linux System Optimizer and Monitoring";
homepage = "https://github.com/oguzhaninan/stacer";
license = licenses.gpl3Only;
maintainers = with maintainers; [ dit7ya ];
platforms = platforms.linux;
mainProgram = "stacer";
};
}

View File

@@ -0,0 +1,87 @@
{
mkDerivation,
lib,
stdenv,
fetchurl,
ncurses,
libuuid,
pkg-config,
libjpeg,
zlib,
libewf-legacy,
enableNtfs ? !stdenv.hostPlatform.isDarwin,
ntfs3g ? null,
enableExtFs ? !stdenv.hostPlatform.isDarwin,
e2fsprogs ? null,
enableQt ? false,
qtbase ? null,
qttools ? null,
qwt ? null,
}:
assert enableNtfs -> ntfs3g != null;
assert enableExtFs -> e2fsprogs != null;
assert enableQt -> qtbase != null;
assert enableQt -> qttools != null;
assert enableQt -> qwt != null;
(if enableQt then mkDerivation else stdenv.mkDerivation) rec {
pname = "testdisk";
version = "7.2";
src = fetchurl {
url = "https://www.cgsecurity.org/testdisk-${version}.tar.bz2";
hash = "sha256-+DQ74gy0ABxdkaLjvNkYOY8Arm2DEIlKWp8v64E8KD8=";
};
postPatch = ''
substituteInPlace linux/qphotorec.desktop \
--replace "/usr" "$out"
'';
enableParallelBuilding = true;
buildInputs = [
ncurses
libuuid
libjpeg
zlib
libewf-legacy
]
++ lib.optional enableNtfs ntfs3g
++ lib.optional enableExtFs e2fsprogs
++ lib.optionals enableQt [
qtbase
qttools
qwt
];
nativeBuildInputs = [ pkg-config ];
env.NIX_CFLAGS_COMPILE = "-Wno-unused";
meta = {
homepage = "https://www.cgsecurity.org/wiki/Main_Page";
downloadPage = "https://www.cgsecurity.org/wiki/TestDisk_Download";
description = "Data recovery utilities";
longDescription = ''
TestDisk is a powerful free data recovery software. It was primarily
designed to help recover lost partitions and/or make non-booting disks
bootable again when these symptoms are caused by faulty software: certain
types of viruses or human error (such as accidentally deleting a
Partition Table).
PhotoRec is a file data recovery software designed to recover lost files
including video, documents and archives from hard disks, CD-ROMs, and
lost pictures (thus the Photo Recovery name) from digital camera memory.
PhotoRec ignores the file system and goes after the underlying data, so
it will still work even if your media's file system has been severely
damaged or reformatted.
'';
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [
fgaz
ryand56
];
};
}

View File

@@ -0,0 +1,17 @@
---
UEFITool/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/UEFITool/CMakeLists.txt b/UEFITool/CMakeLists.txt
index aef60d0..98723ac 100644
--- a/UEFITool/CMakeLists.txt
+++ b/UEFITool/CMakeLists.txt
@@ -143,4 +143,4 @@ IF(UNIX AND (NOT APPLE) AND (NOT CYGWIN))
INSTALL(FILES uefitool.desktop DESTINATION share/applications)
ENDIF()
-INSTALL(TARGETS UEFITool BUNDLE DESTINATION "/Applications" )
+INSTALL(TARGETS UEFITool BUNDLE DESTINATION "Applications" )
--
2.40.1

View File

@@ -0,0 +1,38 @@
{
lib,
stdenv,
fetchFromGitHub,
qtbase,
cmake,
wrapQtAppsHook,
zip,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "uefitool";
version = "A72";
src = fetchFromGitHub {
hash = "sha256-sVosxqUUvkZwJIY9FZ9N6xoDyBpSgTLFUmD4B9ymTHs=";
owner = "LongSoft";
repo = "uefitool";
tag = finalAttrs.version;
};
buildInputs = [ qtbase ];
nativeBuildInputs = [
cmake
zip
wrapQtAppsHook
];
patches = lib.optionals stdenv.hostPlatform.isDarwin [ ./bundle-destination.patch ];
meta = {
description = "UEFI firmware image viewer and editor";
homepage = "https://github.com/LongSoft/uefitool";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ athre0z ];
platforms = lib.platforms.unix;
mainProgram = "uefitool";
};
})

View File

@@ -0,0 +1,48 @@
{
lib,
mkDerivation,
fetchFromGitHub,
qtbase,
qmake,
cmake,
zip,
}:
mkDerivation rec {
pname = "uefitool";
version = "0.28.0";
src = fetchFromGitHub {
hash = "sha256-StqrOMsKst2X2yQQ/Xl7iLAuA4QXEOyj2KtE7ZtoUNg=";
owner = "LongSoft";
repo = "uefitool";
tag = version;
};
buildInputs = [ qtbase ];
nativeBuildInputs = [
qmake
cmake
zip
];
dontConfigure = true;
buildPhase = ''
bash unixbuild.sh
'';
installPhase = ''
mkdir -p "$out"/bin
cp UEFITool UEFIReplace/UEFIReplace UEFIPatch/UEFIPatch "$out"/bin
'';
meta = {
description = "UEFI firmware image viewer and editor";
homepage = "https://github.com/LongSoft/uefitool";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ athre0z ];
# uefitool supposedly works on other platforms, but their build script only works on linux in nixpkgs
platforms = lib.platforms.linux;
mainProgram = "UEFITool";
};
}

View File

@@ -0,0 +1,5 @@
{ libsForQt5, qt6Packages }:
{
new-engine = qt6Packages.callPackage ./new-engine.nix { };
old-engine = libsForQt5.callPackage ./old-engine.nix { };
}