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,46 @@
{
lib,
stdenv,
fetchurl,
gettext,
libgpg-error,
libgcrypt,
libksba,
zlib,
}:
stdenv.mkDerivation rec {
pname = "ntbtls";
version = "0.3.2";
src = fetchurl {
url = "mirror://gnupg/ntbtls/ntbtls-${version}.tar.bz2";
sha256 = "sha256-vfy5kCSs7JxsS5mK1juzkh30z+5KdyrWwMoyTbvysHw=";
};
outputs = [
"dev"
"out"
];
buildInputs = [
libgcrypt
libgpg-error
libksba
zlib
]
++ lib.optional stdenv.hostPlatform.isDarwin gettext;
postInstall = ''
moveToOutput "bin/ntbtls-config" $dev
'';
meta = with lib; {
description = "Tiny TLS 1.2 only implementation";
mainProgram = "ntbtls-config";
homepage = "https://www.gnupg.org/software/ntbtls/";
license = licenses.gpl3Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ joachifm ];
};
}

View File

@@ -0,0 +1,49 @@
{
lib,
stdenv,
fetchFromGitHub,
nix-update-script,
cmake,
pkg-config,
fmt,
lzo,
zlib,
zstd,
}:
stdenv.mkDerivation rec {
pname = "ntfs2btrfs";
version = "20250616";
src = fetchFromGitHub {
owner = "maharmstone";
repo = "ntfs2btrfs";
tag = version;
hash = "sha256-hRPidvpBVm42Rg+acwHQ6b8WHGMPbE6SHwlrQrB+fD8=";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
fmt
lzo
zlib
zstd
];
passthru.updateScript = nix-update-script { };
meta = {
description = "CLI tool which does in-place conversion of Microsoft's NTFS filesystem to the open-source filesystem Btrfs";
homepage = "https://github.com/maharmstone/ntfs2btrfs";
license = with lib.licenses; [ gpl2Only ];
maintainers = with lib.maintainers; [ j1nxie ];
mainProgram = "ntfs2btrfs";
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,98 @@
diff --git a/configure.ac b/configure.ac
index 9aa25bd5..c7c0437b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -185,6 +185,30 @@ AC_ARG_ENABLE(
]
)
+AC_ARG_WITH(
+ [mount-helper],
+ [AS_HELP_STRING([--with-mount-helper=BIN],[use the specified binary as mount helper @<:@default=/sbin/mount@:>@])],
+ [mount_helper="$withval"],
+ [mount_helper="/sbin/mount"]
+)
+AC_DEFINE_UNQUOTED([MOUNT_HELPER], ["$mount_helper"], [Binary used as mount helper.])
+
+AC_ARG_WITH(
+ [umount-helper],
+ [AS_HELP_STRING([--with-umount-helper=BIN],[use the specified binary as umount helper @<:@default=/sbin/umount@:>@])],
+ [umount_helper="$withval"],
+ [umount_helper="/sbin/umount"]
+)
+AC_DEFINE_UNQUOTED([UMOUNT_HELPER], ["$umount_helper"], [Binary used as umount helper.])
+
+AC_ARG_WITH(
+ [modprobe-helper],
+ [AS_HELP_STRING([--with-modprobe-helper=BIN],[use the specified binary as modprobe helper @<:@default=/sbin/modprobe@:>@])],
+ [modprobe_helper="$withval"],
+ [modprobe_helper="/sbin/modprobe"]
+)
+AC_DEFINE_UNQUOTED([MODPROBE_HELPER], ["$modprobe_helper"], [Binary used as modprobe helper.])
+
# pthread_rwlock_t requires _GNU_SOURCE
AC_GNU_SOURCE
diff --git a/libfuse-lite/mount_util.c b/libfuse-lite/mount_util.c
index 8b317224..ee75ace6 100644
--- a/libfuse-lite/mount_util.c
+++ b/libfuse-lite/mount_util.c
@@ -89,10 +89,10 @@ int fuse_mnt_add_mount(const char *progname, const char *fsname,
exit(1);
}
rmdir(tmp);
- execle("/sbin/mount", "/sbin/mount", "-F", type, "-o", opts,
+ execle(MOUNT_HELPER, MOUNT_HELPER, "-F", type, "-o", opts,
fsname, mnt, NULL, &env);
- fprintf(stderr, "%s: failed to execute /sbin/mount: %s\n", progname,
- strerror(errno));
+ fprintf(stderr, "%s: failed to execute %s: %s\n", progname,
+ MOUNT_HELPER, strerror(errno));
exit(1);
}
res = waitpid(res, &status, 0);
@@ -126,14 +126,14 @@ int fuse_mnt_umount(const char *progname, const char *mnt, int lazy)
setuid(geteuid());
if (lazy) {
- execle("/sbin/umount", "/sbin/umount", mnt,
+ execle(UMOUNT_HELPER, UMOUNT_HELPER, mnt,
NULL, &env);
} else {
- execle("/sbin/umount", "/sbin/umount", "-f", mnt,
+ execle(UMOUNT_HELPER, UMOUNT_HELPER, "-f", mnt,
NULL, &env);
}
- fprintf(stderr, "%s: failed to execute /sbin/umount: %s\n", progname,
- strerror(errno));
+ fprintf(stderr, "%s: failed to execute %s: %s\n", progname,
+ UMOUNT_HELPER, strerror(errno));
exit(1);
}
res = waitpid(res, &status, 0);
diff --git a/src/lowntfs-3g.c b/src/lowntfs-3g.c
index 9330500c..dd18a93f 100644
--- a/src/lowntfs-3g.c
+++ b/src/lowntfs-3g.c
@@ -4463,7 +4463,7 @@ static fuse_fstype load_fuse_module(void)
int i;
struct stat st;
pid_t pid;
- const char *cmd = "/sbin/modprobe";
+ const char *cmd = MODPROBE_HELPER;
char *env = (char*)NULL;
struct timespec req = { 0, 100000000 }; /* 100 msec */
fuse_fstype fstype;
diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c
index d8227e71..f5d77252 100644
--- a/src/ntfs-3g.c
+++ b/src/ntfs-3g.c
@@ -4171,7 +4171,7 @@ static fuse_fstype load_fuse_module(void)
int i;
struct stat st;
pid_t pid;
- const char *cmd = "/sbin/modprobe";
+ const char *cmd = MODPROBE_HELPER;
char *env = (char*)NULL;
struct timespec req = { 0, 100000000 }; /* 100 msec */
fuse_fstype fstype;

View File

@@ -0,0 +1,48 @@
diff --git a/ntfsprogs/Makefile.am b/ntfsprogs/Makefile.am
index 08228322..a390d8c7 100644
--- a/ntfsprogs/Makefile.am
+++ b/ntfsprogs/Makefile.am
@@ -165,7 +165,7 @@ extras: libs $(EXTRA_PROGRAMS)
if ENABLE_MOUNT_HELPER
install-exec-hook:
- $(INSTALL) -d $(DESTDIR)/$(sbindir)
+ $(INSTALL) -d $(DESTDIR)$(sbindir)
$(LN_S) -f $(sbindir)/mkntfs $(DESTDIR)$(sbindir)/mkfs.ntfs
install-data-hook:
@@ -173,7 +173,7 @@ install-data-hook:
$(LN_S) -f mkntfs.8 $(DESTDIR)$(man8dir)/mkfs.ntfs.8
uninstall-local:
- $(RM) -f $(DESTDIR)/sbin/mkfs.ntfs
+ $(RM) -f $(DESTDIR)$(sbindir)/mkfs.ntfs
$(RM) -f $(DESTDIR)$(man8dir)/mkfs.ntfs.8
endif
diff --git a/src/Makefile.am b/src/Makefile.am
index 8d984083..ea407067 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -66,9 +66,9 @@ endif
if ENABLE_MOUNT_HELPER
install-exec-local: install-rootbinPROGRAMS
- $(MKDIR_P) "$(DESTDIR)/sbin"
- $(LN_S) -f "$(rootbindir)/ntfs-3g" "$(DESTDIR)/sbin/mount.ntfs-3g"
- $(LN_S) -f "$(rootbindir)/lowntfs-3g" "$(DESTDIR)/sbin/mount.lowntfs-3g"
+ $(MKDIR_P) "$(DESTDIR)$(rootsbindir)"
+ $(LN_S) -f "$(rootbindir)/ntfs-3g" "$(DESTDIR)$(rootsbindir)/mount.ntfs-3g"
+ $(LN_S) -f "$(rootbindir)/lowntfs-3g" "$(DESTDIR)$(rootsbindir)/mount.lowntfs-3g"
install-data-local: install-man8
$(LN_S) -f ntfs-3g.8 "$(DESTDIR)$(man8dir)/mount.ntfs-3g.8"
@@ -76,7 +76,7 @@ install-data-local: install-man8
uninstall-local:
$(RM) -f "$(DESTDIR)$(man8dir)/mount.ntfs-3g.8"
- $(RM) -f "$(DESTDIR)/sbin/mount.ntfs-3g" "$(DESTDIR)/sbin/mount.lowntfs-3g"
+ $(RM) -f "$(DESTDIR)$(rootsbindir)/mount.ntfs-3g" "$(DESTDIR)$(rootsbindir)/mount.lowntfs-3g"
endif
endif # ENABLE_NTFS_3G

View File

@@ -0,0 +1,94 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
pkg-config,
gettext,
mount,
libuuid,
kmod,
macfuse-stubs,
crypto ? false,
libgcrypt,
gnutls,
fuse,
}:
stdenv.mkDerivation rec {
pname = "ntfs3g";
version = "2022.10.3";
outputs = [
"out"
"dev"
"man"
"doc"
];
src = fetchFromGitHub {
owner = "tuxera";
repo = "ntfs-3g";
rev = version;
sha256 = "sha256-nuFTsGkm3zmSzpwmhyY7Ke0VZfZU0jHOzEWaLBbglQk=";
};
buildInputs = [
gettext
libuuid
fuse
]
++ lib.optionals crypto [
gnutls
libgcrypt
];
# Note: libgcrypt is listed here non-optionally because its m4 macros are
# being used in ntfs-3g's configure.ac.
nativeBuildInputs = [
autoreconfHook
libgcrypt
pkg-config
];
patches = [
# https://github.com/tuxera/ntfs-3g/pull/39
./autoconf-sbin-helpers.patch
./consistent-sbindir-usage.patch
];
configureFlags = [
"--disable-ldconfig"
"--exec-prefix=\${prefix}"
"--enable-mount-helper"
"--enable-posix-acls"
"--enable-xattr-mappings"
"--${if crypto then "enable" else "disable"}-crypto"
"--enable-extras"
"--with-mount-helper=${mount}/bin/mount"
"--with-umount-helper=${mount}/bin/umount"
"--with-fuse=external"
]
++ lib.optionals stdenv.hostPlatform.isLinux [
"--with-modprobe-helper=${kmod}/bin/modprobe"
];
postInstall = ''
# Prefer ntfs-3g over the ntfs driver in the kernel.
ln -sv mount.ntfs-3g $out/sbin/mount.ntfs
'';
enableParallelBuilding = true;
meta = with lib; {
homepage = "https://github.com/tuxera/ntfs-3g";
description = "FUSE-based NTFS driver with full write support";
maintainers = with maintainers; [ dezgeg ];
mainProgram = "ntfs-3g";
platforms = with platforms; darwin ++ linux;
license = with licenses; [
gpl2Plus # ntfs-3g itself
lgpl2Plus # fuse-lite
];
};
}

View File

@@ -0,0 +1,29 @@
{
buildGoModule,
fetchurl,
lib,
}:
buildGoModule rec {
pname = "ntfy-alertmanager";
version = "0.5.0";
src = fetchurl {
url = "https://git.xenrox.net/~xenrox/ntfy-alertmanager/refs/download/v${version}/ntfy-alertmanager-${version}.tar.gz";
hash = "sha256-Sn2hPt03o4Pi1WY/3d5oWhWUt8x+3P8hoNPS58tj0Kw=";
};
vendorHash = "sha256-NHaLv+Ulzl4ev3a6OjZiacCSmYAtvqFFmbYzAp+4AFU=";
meta = with lib; {
description = "Bridge between ntfy and Alertmanager";
homepage = "https://git.xenrox.net/~xenrox/ntfy-alertmanager";
license = licenses.agpl3Only;
mainProgram = "ntfy-alertmanager";
maintainers = with maintainers; [
bleetube
fpletz
];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,93 @@
{
lib,
buildGoModule,
fetchFromGitHub,
buildNpmPackage,
nixosTests,
debianutils,
mkdocs,
python3,
python3Packages,
}:
buildGoModule (
finalAttrs:
let
ui = buildNpmPackage {
inherit (finalAttrs) src version;
pname = "ntfy-sh-ui";
npmDepsHash = "sha256-LmEJ7JuaAdjB816VspVXAQC+I46lpNAjwfLTxeNeLPc=";
prePatch = ''
cd web/
'';
installPhase = ''
runHook preInstall
mv build/index.html build/app.html
rm build/config.js
mkdir -p $out
mv build/ $out/site
runHook postInstall
'';
};
in
{
pname = "ntfy-sh";
version = "2.14.0";
src = fetchFromGitHub {
owner = "binwiederhier";
repo = "ntfy";
tag = "v${finalAttrs.version}";
hash = "sha256-8BqJ2/u+g5P68ekYu/ztzjdQ91c8dIazeNdLRFpqVy0=";
};
vendorHash = "sha256-3adQNZ2G0wKW3aV+gsGo/il6NsrIhGPbI7P4elWrKZQ=";
doCheck = false;
ldflags = [
"-s"
"-w"
"-X main.version=${finalAttrs.version}"
];
nativeBuildInputs = [
debianutils
mkdocs
python3
python3Packages.mkdocs-material
python3Packages.mkdocs-minify-plugin
];
postPatch = ''
sed -i 's# /bin/echo# echo#' Makefile
'';
preBuild = ''
cp -r ${ui}/site/ server/
make docs-build
'';
passthru = {
updateScript = ./update.sh;
tests.ntfy-sh = nixosTests.ntfy-sh;
};
meta = {
description = "Send push notifications to your phone or desktop via PUT/POST";
homepage = "https://ntfy.sh";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
arjan-s
fpletz
matthiasbeyer
];
mainProgram = "ntfy";
};
}
)

View File

@@ -0,0 +1,22 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p gnugrep gnused coreutils curl wget jq nix-update prefetch-npm-deps nodejs
set -euo pipefail
pushd "$(dirname "${BASH_SOURCE[0]}")"
version=$(curl -s "https://api.github.com/repos/binwiederhier/ntfy/tags" | jq -r .[0].name | grep -oP "^v\K.*")
url="https://raw.githubusercontent.com/binwiederhier/ntfy/v$version/"
if [[ "$UPDATE_NIX_OLD_VERSION" == "$version" ]]; then
echo "Already up to date!"
exit 0
fi
rm -f package-lock.json
wget "$url/web/package-lock.json"
npm_hash=$(prefetch-npm-deps package-lock.json)
sed -i 's#npmDepsHash = "[^"]*"#npmDepsHash = "'"$npm_hash"'"#' default.nix
rm -f package-lock.json
popd
nix-update ntfy-sh --version $version

View File

@@ -0,0 +1,137 @@
{
lib,
stdenv,
python3,
fetchFromGitHub,
fetchpatch,
withXmpp ? false, # sleekxmpp doesn't support python 3.10, see https://github.com/dschep/ntfy/issues/266
withMatrix ? true,
withSlack ? true,
withEmoji ? true,
withPid ? true,
withDbus ? stdenv.hostPlatform.isLinux,
}:
let
python = python3.override {
self = python;
packageOverrides = self: super: {
ntfy-webpush = self.callPackage ./webpush.nix { };
# databases, on which slack-sdk depends, is incompatible with SQLAlchemy 2.0
sqlalchemy = super.sqlalchemy_1_4;
};
};
in
python.pkgs.buildPythonApplication rec {
pname = "ntfy";
version = "2.7.0";
pyproject = true;
src = fetchFromGitHub {
owner = "dschep";
repo = "ntfy";
rev = "v${version}";
sha256 = "09f02cn4i1l2aksb3azwfb70axqhn7d0d0vl2r6640hqr74nc1cv";
};
patches = [
# Fix Slack integration no longer working.
# From https://github.com/dschep/ntfy/pull/229 - "Swap Slacker for Slack SDK"
(fetchpatch {
name = "ntfy-Swap-Slacker-for-Slack-SDK.patch";
url = "https://github.com/dschep/ntfy/commit/2346e7cfdca84c8f1afc7462a92145c1789deb3e.patch";
sha256 = "13k7jbsdx0jx7l5s8whirric76hml5bznkfcxab5xdp88q52kpk7";
})
# Add compatibility with emoji 2.0
# https://github.com/dschep/ntfy/pull/250
(fetchpatch {
name = "ntfy-Add-compatibility-with-emoji-2.0.patch";
url = "https://github.com/dschep/ntfy/commit/4128942bb7a706117e7154a50a73b88f531631fe.patch";
sha256 = "sha256-V8dIy/K957CPFQQS1trSI3gZOjOcVNQLgdWY7g17bRw=";
})
# Change getargspec to getfullargspec for python 3.11 compatibility
(fetchpatch {
url = "https://github.com/dschep/ntfy/commit/71be9766ea041d2df6ebbce2781f980eea002852.patch";
hash = "sha256-6OChaTj4g3gxVDScc/JksBISHuq+5fbNQregchSXYaQ=";
})
# Fix compatibility with Python 3.11
# https://github.com/dschep/ntfy/pull/271
(fetchpatch {
url = "https://github.com/dschep/ntfy/pull/271/commits/444b60bec7de474d029cac184e82885011dd1474.patch";
hash = "sha256-PKTu8cOpws1z6f1T4uIi2iCJAoAwu+X0Pe7XnHYtHuI=";
})
# Fix compatibility with Python 3.12
# https://github.com/dschep/ntfy/pull/271
(fetchpatch {
url = "https://github.com/dschep/ntfy/pull/271/commits/d49ab9f9dba4966a44b5f0c6911741edabd35f6b.patch";
hash = "sha256-qTUWMS8EXWYCK/ZL0Us7iJp62UIKwYT1BqDy59832ig=";
})
];
postPatch = ''
# We disable the Darwin specific things because it relies on pyobjc, which we don't have.
substituteInPlace setup.py \
--replace-fail "':sys_platform == \"darwin\"'" "'darwin'"
'';
build-system = with python.pkgs; [ setuptools ];
dependencies =
with python.pkgs;
(
[
requests
ruamel-yaml
appdirs
ntfy-webpush
]
++ lib.optionals withXmpp [
sleekxmpp
dnspython
]
++ lib.optionals withMatrix [
matrix-client
]
++ lib.optionals withSlack [
slack-sdk
]
++ lib.optionals withEmoji [
emoji
]
++ lib.optionals withPid [
psutil
]
++ lib.optionals withDbus [
dbus-python
]
);
nativeCheckInputs = with python.pkgs; [
mock
pytestCheckHook
];
disabledTests = [
"test_xmpp"
];
disabledTestPaths = [
"tests/test_xmpp.py"
];
preCheck = ''
export HOME=$(mktemp -d)
'';
pythonImportsCheck = [ "ntfy" ];
meta = with lib; {
description = "Utility for sending notifications, on demand and when commands finish";
homepage = "https://ntfy.readthedocs.io/en/latest/";
license = licenses.gpl3;
maintainers = with maintainers; [ kamilchm ];
mainProgram = "ntfy";
};
}

View File

@@ -0,0 +1,44 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
pywebpush,
py-vapid,
}:
buildPythonPackage rec {
pname = "ntfy-webpush";
version = "0.1.3";
pyproject = true;
src = fetchFromGitHub {
owner = "dschep";
repo = "ntfy-webpush";
rev = "v${version}";
sha256 = "1dxlvq3glf8yjkn1hdk89rx1s4fi9ygg46yn866a9v7a5a83zx2n";
};
postPatch = ''
# break dependency loop
substituteInPlace setup.py \
--replace-fail "'ntfy', " ""
'';
build-system = [ setuptools ];
dependencies = [
pywebpush
py-vapid
];
# no tests, just a script
doCheck = false;
meta = with lib; {
description = "Cloudbell webpush notification support for ntfy";
homepage = "https://dschep.github.io/ntfy-webpush/";
license = licenses.mit;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,54 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
krb5,
liburcu,
libtirpc,
libnsl,
}:
stdenv.mkDerivation rec {
pname = "ntirpc";
version = "6.3";
src = fetchFromGitHub {
owner = "nfs-ganesha";
repo = "ntirpc";
rev = "v${version}";
sha256 = "sha256-e4eF09xwX2Qf/y9YfOGy7p6yhDFnKGI5cnrQy3o8c98=";
};
outputs = [
"out"
"dev"
];
postPatch = ''
substituteInPlace ntirpc/netconfig.h --replace "/etc/netconfig" "$out/etc/netconfig"
sed '1i#include <assert.h>' -i src/work_pool.c
'';
nativeBuildInputs = [ cmake ];
buildInputs = [
krb5
liburcu
libnsl
];
postInstall = ''
mkdir -p $out/etc
# Library needs a netconfig to run.
# Steal the file from libtirpc
cp ${libtirpc}/etc/netconfig $out/etc/
'';
meta = with lib; {
description = "Transport-independent RPC (TI-RPC)";
homepage = "https://github.com/nfs-ganesha/ntirpc";
maintainers = [ maintainers.markuskowa ];
platforms = platforms.linux;
license = licenses.bsd3;
};
}

View File

@@ -0,0 +1,52 @@
{
lib,
stdenv,
fetchFromGitHub,
cairo,
libjpeg,
libXft,
pkg-config,
python3,
wafHook,
}:
stdenv.mkDerivation rec {
pname = "ntk";
version = "1.3.1001";
src = fetchFromGitHub {
owner = "linuxaudio";
repo = "ntk";
rev = "v${version}";
sha256 = "sha256-NyEdg6e+9CI9V+TIgdpPyH1ei+Vq8pUxD3wPzWY5fEU=";
};
nativeBuildInputs = [
pkg-config
wafHook
];
buildInputs = [
cairo
libjpeg
libXft
python3
];
# NOTE: ntk provides its own waf script that is incompatible with new
# python versions. If the script is not present, wafHook will install
# a compatible version from nixpkgs.
prePatch = ''
rm waf
'';
meta = {
description = "Fork of FLTK 1.3.0 with additional functionality";
version = version;
homepage = "http://non.tuxfamily.org/";
license = lib.licenses.lgpl21;
maintainers = with lib.maintainers; [
magnetophon
nico202
];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,91 @@
{
stdenv,
lib,
fetchurl,
perl,
gmp,
gf2x ? null,
# I asked the ntl maintainer weather or not to include gf2x by default:
# > If I remember correctly, gf2x is now thread safe, so there's no reason not to use it.
withGf2x ? true,
tune ? false, # tune for current system; non reproducible and time consuming
}:
assert withGf2x -> gf2x != null;
stdenv.mkDerivation (finalAttrs: {
pname = "ntl";
version = "11.5.1";
src = fetchurl {
url = "http://www.shoup.net/ntl/ntl-${finalAttrs.version}.tar.gz";
hash = "sha256-IQ0GwxMGy8bq9oFEU8Vsd22djo3zbXTrMG9qUj0caoo=";
};
strictDeps = true;
depsBuildBuild = [
perl # needed for ./configure
];
buildInputs = [
gmp
];
sourceRoot = "ntl-${finalAttrs.version}/src";
enableParallelBuilding = true;
dontAddPrefix = true; # DEF_PREFIX instead
# Written in perl, does not support autoconf-style
# --build=/--host= options:
# Error: unrecognized option: --build=x86_64-unknown-linux-gnu
configurePlatforms = [ ];
# reference: http://shoup.net/ntl/doc/tour-unix.html
dontAddStaticConfigureFlags = true; # perl config doesn't understand it.
configureFlags = [
"DEF_PREFIX=$(out)"
"NATIVE=off" # don't target code to current hardware (reproducibility, portability)
"TUNE=${
if tune then
"auto"
else if stdenv.hostPlatform.isx86 then
"x86" # "chooses options that should be well suited for most x86 platforms"
else
"generic" # "chooses options that should be OK for most platforms"
}"
"CXX=${stdenv.cc.targetPrefix}c++"
"AR=${stdenv.cc.targetPrefix}ar"
]
++ lib.optionals (!stdenv.hostPlatform.isStatic) [
"SHARED=on" # genereate a shared library
]
++ lib.optionals withGf2x [
"NTL_GF2X_LIB=on"
"GF2X_PREFIX=${gf2x}"
];
enableParallelChecking = true;
doCheck = true; # takes some time
meta = {
description = "Library for doing Number Theory";
longDescription = ''
NTL is a high-performance, portable C++ library providing data
structures and algorithms for manipulating signed, arbitrary
length integers, and for vectors, matrices, and polynomials over
the integers and over finite fields.
'';
# Upstream contact: maintainer is victorshoup on GitHub. Alternatively the
# email listed on the homepage.
homepage = "http://www.shoup.net/ntl/";
# also locally at "${src}/doc/tour-changes.html";
changelog = "https://www.shoup.net/ntl/doc/tour-changes.html";
teams = [ lib.teams.sage ];
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.all;
# Does not cross compile
# https://github.com/libntl/ntl/issues/8
broken = !(stdenv.buildPlatform.canExecute stdenv.hostPlatform);
};
})

View File

@@ -0,0 +1,39 @@
{
lib,
fetchFromGitHub,
python3,
}:
python3.pkgs.buildPythonApplication {
pname = "ntlm-challenger";
version = "0-unstable-2022-11-10";
format = "other";
src = fetchFromGitHub {
owner = "nopfor";
repo = "ntlm_challenger";
rev = "bd61ef65c7692fb1968383894da662bf99026aec";
hash = "sha256-F9aZB8M25gPDY7J7cXkAH30m7zmk4NHczUHyBDBZInA=";
};
propagatedBuildInputs = with python3.pkgs; [
requests
impacket
];
installPhase = ''
runHook preInstall
install -D ntlm_challenger.py $out/bin/ntlm_challenger
runHook postInstall
'';
meta = with lib; {
description = "Parse NTLM challenge messages over HTTP and SMB";
mainProgram = "ntlm_challenger";
homepage = "https://github.com/nopfor/ntlm_challenger";
license = licenses.mit;
maintainers = [ maintainers.crem ];
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
fetchFromGitHub,
python3,
}:
python3.pkgs.buildPythonApplication rec {
pname = "ntlmrecon";
version = "0.4";
pyproject = true;
src = fetchFromGitHub {
owner = "pwnfoo";
repo = "NTLMRecon";
tag = "v-${version}";
sha256 = "0rrx49li2l9xlcax84qxjf60nbzp3fgq77c36yqmsp0pc9i89ah6";
};
build-system = with python3.pkgs; [ setuptools ];
dependencies = with python3.pkgs; [
colorama
iptools
requests
termcolor
];
# Project has no tests
doCheck = false;
pythonImportsCheck = [
"ntlmrecon"
];
meta = {
description = "Information enumerator for NTLM authentication enabled web endpoints";
mainProgram = "ntlmrecon";
homepage = "https://github.com/pwnfoo/NTLMRecon";
changelog = "https://github.com/pwnfoo/NTLMRecon/releases/tag/v-${version}";
license = with lib.licenses; [ mit ];
maintainers = with lib.maintainers; [ fab ];
};
}

View File

@@ -0,0 +1,105 @@
{
lib,
stdenv,
autoreconfHook,
curl,
expat,
fetchFromGitHub,
git,
json_c,
libcap,
libmaxminddb,
libmysqlclient,
libpcap,
libsodium,
ndpi,
net-snmp,
openssl,
pkg-config,
rdkafka,
gtest,
rrdtool,
hiredis,
sqlite,
which,
zeromq,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ntopng";
version = "6.2";
src = fetchFromGitHub {
owner = "ntop";
repo = "ntopng";
tag = finalAttrs.version;
hash = "sha256-8PG18mOV/6EcBpKt9kLyI40OLDnpnc2b4IUu9JbK/Co=";
fetchSubmodules = true;
};
preConfigure = ''
substituteInPlace Makefile.in \
--replace "/bin/rm" "rm"
'';
nativeBuildInputs = [
autoreconfHook
git
pkg-config
which
];
buildInputs = [
curl
expat
json_c
libcap
libmaxminddb
libmysqlclient
libpcap
gtest
hiredis
libsodium
net-snmp
openssl
rdkafka
rrdtool
sqlite
zeromq
];
autoreconfPhase = "bash autogen.sh";
configureFlags = [
"--with-ndpi-includes=${ndpi}/include/ndpi"
"--with-ndpi-static-lib=${ndpi}/lib/"
];
preBuild = ''
sed -e "s|\(#define CONST_BIN_DIR \).*|\1\"$out/bin\"|g" \
-e "s|\(#define CONST_SHARE_DIR \).*|\1\"$out/share\"|g" \
-i include/ntop_defines.h
'';
# Upstream build system makes
# $out/share/ntopng/httpdocs/geoip/README.geolocation.md a dangling symlink
# to ../../doc/README.geolocation.md. Copying the whole doc/ tree adds over
# 70 MiB to the output size, so only copy the files we need for now.
# (Ref. noBrokenSymlinks.)
postInstall = ''
mkdir -p "$out/share/ntopng/doc"
cp -r doc/README.geolocation.md "$out/share/ntopng/doc/"
'';
enableParallelBuilding = true;
meta = with lib; {
description = "High-speed web-based traffic analysis and flow collection tool";
homepage = "https://www.ntop.org/products/traffic-analysis/ntop/";
changelog = "https://github.com/ntop/ntopng/blob/${finalAttrs.version}/CHANGELOG.md";
license = licenses.gpl3Plus;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ bjornfor ];
mainProgram = "ntopng";
};
})

View File

@@ -0,0 +1,64 @@
{
stdenv,
lib,
fetchurl,
autoreconfHook,
openssl,
perl,
pps-tools,
libcap,
}:
stdenv.mkDerivation rec {
pname = "ntp";
version = "4.2.8p18";
src = fetchurl {
url = "https://archive.ntp.org/ntp4/ntp-${lib.versions.majorMinor version}/ntp-${version}.tar.gz";
hash = "sha256-z4TF8/saKVKElCYk2CP/+mNBROCWz8T5lprJjvX0aOU=";
};
# fix for gcc-14 compile failure
postPatch = ''
substituteInPlace sntp/m4/openldap-thread-check.m4 \
--replace-fail "pthread_detach(NULL)" "pthread_detach(pthread_self())"
'';
configureFlags = [
"--sysconfdir=/etc"
"--localstatedir=/var"
"--with-openssl-libdir=${lib.getLib openssl}/lib"
"--with-openssl-incdir=${openssl.dev}/include"
"--enable-ignore-dns-errors"
"--with-yielding-select=yes"
]
++ lib.optional stdenv.hostPlatform.isLinux "--enable-linuxcaps";
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [
openssl
perl
]
++ lib.optionals stdenv.hostPlatform.isLinux [
pps-tools
libcap
];
hardeningEnable = [ "pie" ];
postInstall = ''
rm -rf $out/share/doc
'';
meta = with lib; {
homepage = "https://www.ntp.org/";
description = "Implementation of the Network Time Protocol";
license = {
# very close to isc and bsd2
url = "https://www.eecis.udel.edu/~mills/ntp/html/copyright.html";
};
maintainers = with maintainers; [ thoughtpolice ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,79 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
ntpd-rs,
installShellFiles,
pandoc,
nixosTests,
nix-update-script,
testers,
}:
rustPlatform.buildRustPackage rec {
pname = "ntpd-rs";
version = "1.6.2";
src = fetchFromGitHub {
owner = "pendulum-project";
repo = "ntpd-rs";
tag = "v${version}";
hash = "sha256-X8nmfG7ZhtB4P6N0ku0Gc9xHOGJFeGTnB1WizZ2X1fk=";
};
cargoHash = "sha256-p3ryAggKR6ylCvaQ8M30OmLyGCL4bOYR/YwqNfAzcAg=";
nativeBuildInputs = [
pandoc
installShellFiles
];
postPatch = ''
substituteInPlace utils/generate-man.sh \
--replace-fail 'utils/pandoc.sh' 'pandoc'
'';
postBuild = ''
source utils/generate-man.sh
'';
postInstall = ''
install -Dm444 -t $out/lib/systemd/system docs/examples/conf/{ntpd-rs,ntpd-rs-metrics}.service
installManPage docs/precompiled/man/{ntp.toml.5,ntp-ctl.8,ntp-daemon.8,ntp-metrics-exporter.8}
'';
outputs = [
"out"
"man"
];
passthru = {
tests = {
nixos = lib.optionalAttrs stdenv.hostPlatform.isLinux nixosTests.ntpd-rs;
version = testers.testVersion {
package = ntpd-rs;
inherit version;
};
};
updateScript = nix-update-script { };
};
meta = {
description = "Full-featured implementation of the Network Time Protocol";
homepage = "https://tweedegolf.nl/en/pendulum";
changelog = "https://github.com/pendulum-project/ntpd-rs/blob/v${version}/CHANGELOG.md";
license = with lib.licenses; [
mit # or
asl20
];
maintainers = with lib.maintainers; [
fpletz
getchoo
];
mainProgram = "ntp-ctl";
# note: Undefined symbols for architecture x86_64: "_ntp_adjtime"
broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64;
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "ntpstat";
version = "0.6";
src = fetchFromGitHub {
owner = "mlichvar";
repo = "ntpstat";
rev = "${finalAttrs.version}";
hash = "sha256-dw6Pi+aB7uK65H0HL7q1vYnM5Dp0D+kG+ZIaiv8VH5I=";
};
postPatch = ''
patchShebangs ntpstat
'';
makeFlags = [ "prefix=${placeholder "out"}" ];
meta = {
description = "Print the ntpd or chronyd synchronisation status";
homepage = "https://github.com/mlichvar/ntpstat";
license = lib.licenses.mit;
mainProgram = "nptstat";
maintainers = with lib.maintainers; [ hzeller ];
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,12 @@
diff -Nur -x '*.orig' -x '*~' nttcp-1.47/nttcp.c nttcp-1.47.new/nttcp.c
--- nttcp-1.47/nttcp.c 2000-12-18 05:16:54.000000000 -0500
+++ nttcp-1.47.new/nttcp.c 2012-01-30 23:44:02.260501225 -0500
@@ -372,7 +372,7 @@
#define Message(x) fMessage(stdout, x)
void Exit(char *s, int ret) {
- syslog(LOG_DEBUG, s);
+ syslog(LOG_DEBUG, "%s", s);
fMessage(stderr,s);
exit(ret);
}

View File

@@ -0,0 +1,31 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation rec {
pname = "nttcp";
version = "1.47";
src = fetchurl {
url = "https://deb.debian.org/debian/pool/non-free/n/nttcp/nttcp_${version}.orig.tar.gz";
sha256 = "1bl17dsd53lbpjdqfmpgpd7dms6d2w3scpg7ki7qgfjhs8sarq50";
};
patches = [
# Fix format string compiler error
./format-security.patch
];
makeFlags = [
"prefix=${placeholder "out"}"
];
meta = with lib; {
description = "New test TCP program";
license = licenses.unfree;
maintainers = with maintainers; [ emilytrau ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation rec {
pname = "ntttcp";
version = "1.4.0";
src = fetchFromGitHub {
owner = "microsoft";
repo = "ntttcp-for-linux";
rev = version;
sha256 = "sha256-6O7qSrR6EFr7k9lHQHGs/scZxJJ5DBNDxlSL5hzlRf4=";
};
preBuild = "cd src";
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp ntttcp $out/bin
runHook postInstall
'';
meta = with lib; {
description = "Linux network throughput multiple-thread benchmark tool";
homepage = "https://github.com/microsoft/ntttcp-for-linux";
license = licenses.mit;
maintainers = [ ];
platforms = platforms.linux;
mainProgram = "ntttcp";
};
}