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,48 @@
{
stdenv,
cjdns,
nodejs,
makeWrapper,
lib,
}:
stdenv.mkDerivation {
pname = "cjdns-tools";
version = cjdns.version;
src = cjdns.src;
buildInputs = [
nodejs
];
nativeBuildInputs = [
makeWrapper
];
buildPhase = ''
patchShebangs tools
sed -e "s|'password': 'NONE'|'password': Fs.readFileSync('/etc/cjdns.keys').toString().split('\\\\n').map(v => v.split('=')).filter(v => v[0] === 'CJDNS_ADMIN_PASSWORD').map(v => v[1])[0]|g" \
-i tools/lib/cjdnsadmin/cjdnsadmin.js
'';
installPhase = ''
mkdir -p $out/bin
cat ${./wrapper.sh} | sed "s|@@out@@|$out|g" > $out/bin/cjdns-tools
chmod +x $out/bin/cjdns-tools
cp -r tools $out/tools
find $out/tools -maxdepth 1 -type f -exec chmod -v a+x {} \;
cp -r node_modules $out/node_modules
'';
meta = {
homepage = "https://github.com/cjdelisle/cjdns";
description = "Tools for cjdns managment";
license = lib.licenses.gpl3Plus;
maintainers = [ ];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
mainProgram = "cjdns-tools";
};
}

View File

@@ -0,0 +1,29 @@
#!/usr/bin/env bash
export PATH="@@out@@/tools:$PATH"
set -eo pipefail
if ! cat /etc/cjdns.keys >/dev/null 2>&1; then
echo "ERROR: No permission to read /etc/cjdns.keys (use sudo)" >&2
exit 1
fi
if [[ -z $1 ]]; then
echo "Cjdns admin"
echo "Usage: $0 <command> <args..>"
echo
echo "Commands:" $(find @@out@@/tools -maxdepth 1 -type f | sed -r "s|.+/||g")
_sh=$(which sh)
PATH="@@out@@/tools" PS1="cjdns\$ " "$_sh"
else
if [[ ! -e @@out@@/tools/$1 ]]; then
echo "ERROR: '$1' is not a valid tool" >&2
exit 2
else
"$@"
fi
fi

View File

@@ -0,0 +1,89 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
rustPlatform,
nodejs,
which,
util-linux,
nixosTests,
libsodium,
pkg-config,
replaceVars,
}:
rustPlatform.buildRustPackage rec {
pname = "cjdns";
version = "22.1";
src = fetchFromGitHub {
owner = "cjdelisle";
repo = "cjdns";
tag = "cjdns-v${version}";
hash = "sha256-0imQrkcvIA+2Eq/zlC65USMR7T3OUKwQxrB1KtVexyU=";
};
patches = [
(replaceVars ./system-libsodium.patch {
libsodium_include_dir = "${libsodium.dev}/include";
})
# Remove mkpasswd since it is failing the build
(fetchpatch {
url = "https://github.com/cjdelisle/cjdns/commit/6391dba3f5fdab45df4b4b6b71dbe9620286ce32.patch";
hash = "sha256-XVA4tdTVMLrV6zuGoBCkOgQq6NXh0x7u8HgmaxFeoRI=";
})
(fetchpatch {
url = "https://github.com/cjdelisle/cjdns/commit/436d9a9784bae85734992c2561c778fbd2f5ac32.patch";
hash = "sha256-THcYNGVbMx/xf3/5UIxEhz3OlODE0qiYgDBOlHunhj8=";
})
];
cargoHash = "sha256-f96y6ZW0HxC+73ts5re8GIo2aigQgK3gXyF7fMrcJ0o=";
nativeBuildInputs = [
which
nodejs
pkg-config
]
++
# for flock
lib.optional stdenv.hostPlatform.isLinux util-linux;
buildInputs = [ libsodium ];
env.SODIUM_USE_PKG_CONFIG = 1;
env.NIX_CFLAGS_COMPILE = toString (
[
"-O2"
"-Wno-error=array-bounds"
"-Wno-error=stringop-overflow"
"-Wno-error=stringop-truncation"
]
++ lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "11") [
"-Wno-error=stringop-overread"
]
);
cargoTestFlags = [
# don't run doctests since they fail with "cannot find type `Ctx` in this scope"
"--lib"
"--bins"
"--tests"
];
checkFlags = [
# Tests don't seem to work - "called `Result::unwrap()` on an `Err` value: DecryptErr: NO_SESSION"
"--skip=crypto::crypto_auth::tests::test_wireguard_iface_encrypt_decrypt"
"--skip=crypto::crypto_auth::tests::test_wireguard_iface_encrypt_decrypt_with_auth"
];
passthru.tests.basic = nixosTests.cjdns;
meta = {
homepage = "https://github.com/cjdelisle/cjdns";
description = "Encrypted networking for regular people";
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
}

View File

@@ -0,0 +1,28 @@
diff --git a/node_build/make.js b/node_build/make.js
index 1d0b0fa..b640f31 100644
--- a/node_build/make.js
+++ b/node_build/make.js
@@ -254,21 +254,8 @@ Builder.configure({
}).nThen(function (waitFor) {
- const dir = `${builder.config.buildDir}/../..`;
- Fs.readdir(dir, waitFor((err, ret) => {
- if (err) { throw err; }
- ret.forEach((f) => {
- if (!/^libsodium-sys-/.test(f)) { return; }
- const inclPath = `${dir}/${f}/out/source/libsodium/src/libsodium/include`;
- Fs.readdir(inclPath, waitFor((err, ret) => {
- if (foundSodium) { return; }
- if (err && err.code === 'ENOENT') { return; }
- if (err) { throw err; }
- builder.config.includeDirs.push(inclPath);
- foundSodium = true;
- }));
- });
- }));
+ builder.config.includeDirs.push("@libsodium_include_dir@");
+ foundSodium = true;
}).nThen(function (waitFor) {

View File

@@ -0,0 +1,57 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
autoreconfHook,
pkg-config,
doxygen,
check,
jansson,
openssl,
}:
stdenv.mkDerivation rec {
pname = "cjose";
version = "0.6.2.2";
src = fetchFromGitHub {
owner = "zmartzone";
repo = "cjose";
rev = "v${version}";
sha256 = "sha256-vDvCxMpgCdteGvNxy2HCNRaxbhxOuTadL0nM2wkFHtk=";
};
patches = [
# avoid using empty prototypes; support Clang 15 and XCode 14.3 - https://github.com/OpenIDC/cjose/pull/19
(fetchpatch {
url = "https://github.com/OpenIDC/cjose/commit/63e90cf464d6a470e26886435e8d7d96a66747f6.patch";
hash = "sha256-+C5AIejb9InOGiOgUNfuP89J18O71rnq1pXyroxEDFQ=";
})
];
nativeBuildInputs = [
autoreconfHook
pkg-config
doxygen
];
buildInputs = [
jansson
openssl
];
nativeCheckInputs = [ check ];
configureFlags = [
"--with-jansson=${jansson}"
"--with-openssl=${openssl.dev}"
];
meta = {
homepage = "https://github.com/zmartzone/cjose";
changelog = "https://github.com/zmartzone/cjose/blob/${version}/CHANGELOG.md";
description = "C library for Javascript Object Signing and Encryption. This is a maintained fork of the original project";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ midchildan ];
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,91 @@
{
stdenv,
lib,
fetchFromGitHub,
gobject-introspection,
pkg-config,
cairo,
glib,
readline,
libsysprof-capture,
spidermonkey_128,
meson,
mesonEmulatorHook,
dbus,
ninja,
which,
libxml2,
}:
stdenv.mkDerivation {
pname = "cjs";
version = "128.0-unstable-2025-09-15";
src = fetchFromGitHub {
owner = "linuxmint";
repo = "cjs";
# Backport fixes to support GLib 2.86.0 typelibs
# nixpkgs-update: no auto update
# https://github.com/linuxmint/cjs/issues/130
rev = "1f39576bafe6bc05bce960e590dc743dd7990e39";
hash = "sha256-drKLaTZLIZfPIhcVcCAB48PdM2b0GNLe5xrHGBysVmM=";
};
outputs = [
"out"
"dev"
];
strictDeps = true;
nativeBuildInputs = [
meson
ninja
pkg-config
which # for locale detection
libxml2 # for xml-stripblanks
dbus # for dbus-run-session
gobject-introspection
]
++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
mesonEmulatorHook
];
buildInputs = [
cairo
readline
libsysprof-capture
spidermonkey_128
];
propagatedBuildInputs = [
glib
];
mesonFlags = lib.optionals stdenv.hostPlatform.isMusl [
"-Dprofiler=disabled"
];
postPatch = ''
patchShebangs --build build/choose-tests-locale.sh
'';
meta = with lib; {
homepage = "https://github.com/linuxmint/cjs";
description = "JavaScript bindings for Cinnamon";
longDescription = ''
This module contains JavaScript bindings based on gobject-introspection.
'';
license = with licenses; [
gpl2Plus
lgpl2Plus
mit
mpl11
];
platforms = platforms.linux;
teams = [ teams.cinnamon ];
};
}

View File

@@ -0,0 +1,51 @@
{
stdenv,
lib,
fetchFromGitHub,
cmake,
}:
stdenv.mkDerivation rec {
pname = "cjson";
version = "1.7.19";
src = fetchFromGitHub {
owner = "DaveGamble";
repo = "cJSON";
rev = "v${version}";
sha256 = "sha256-WjgzokT9aHJ7dB40BtmhS7ur1slTuXmemgDimZHLVQM=";
};
nativeBuildInputs = [ cmake ];
cmakeFlags = lib.optional (stdenv.cc.isClang && !stdenv.hostPlatform.isDarwin) (
lib.cmakeBool "ENABLE_CUSTOM_COMPILER_FLAGS" false
);
postPatch =
# cJSON actually uses C99 standard, not C89
# https://github.com/DaveGamble/cJSON/issues/275
''
substituteInPlace CMakeLists.txt --replace -std=c89 -std=c99
''
# Fix the build with CMake 4.
#
# See:
# * <https://github.com/DaveGamble/cJSON/issues/946>
# * <https://github.com/DaveGamble/cJSON/pull/935>
# * <https://github.com/DaveGamble/cJSON/pull/949>
+ ''
substituteInPlace CMakeLists.txt \
--replace-fail \
'cmake_minimum_required(VERSION 3.0)' \
'cmake_minimum_required(VERSION 3.10)'
'';
meta = with lib; {
homepage = "https://github.com/DaveGamble/cJSON";
description = "Ultralightweight JSON parser in ANSI C";
license = licenses.mit;
maintainers = [ maintainers.matthiasbeyer ];
platforms = platforms.unix;
};
}