Merge master into staging-next

This commit is contained in:
github-actions[bot]
2024-10-11 18:04:32 +00:00
committed by GitHub
25 changed files with 380 additions and 204 deletions
@@ -578,6 +578,11 @@
- The `rustic` package was upgrade to `0.9.0`, which contains [breaking changes to the config file format](https://github.com/rustic-rs/rustic/releases/tag/v0.9.0).
- `pkgs.formats.ini` and `pkgs.formats.iniWithGlobalSection` with
`listsAsDuplicateKeys` or `listToValue` no longer merge non-list values into
lists by default. Backwards-compatible behavior can be enabled with
`atomsCoercedToLists`.
## Other Notable Changes {#sec-release-24.11-notable-changes}
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
@@ -222,6 +222,27 @@ in
StandardOutput = "journal";
StateDirectory = "gerrit";
WorkingDirectory = "%S/gerrit";
AmbientCapabilities = "";
CapabilityBoundingSet = "";
LockPersonality = true;
NoNewPrivileges = true;
PrivateDevices = true;
PrivateTmp = true;
ProtectClock = true;
ProtectControlGroups = true;
ProtectHome = true;
ProtectHostname = true;
ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
ProtectProc = "noaccess";
ProtectSystem = "full";
RestrictAddressFamilies = [ "AF_UNIX" "AF_INET" "AF_INET6" ];
RestrictNamespaces = true;
RestrictRealtime = true;
RestrictSUIDSGID = true;
SystemCallArchitectures = "native";
UMask = 027;
};
};
};
@@ -15,11 +15,11 @@ let
archive_fmt = if stdenv.hostPlatform.isDarwin then "zip" else "tar.gz";
sha256 = {
x86_64-linux = "0hq2w9rc54qy6234njx6xfh3m1p3d206lr22sdxxa3snnrh4vrs8";
x86_64-darwin = "0knkn4i6vvszxqzsv9564bbassqgszr8bfa4l7hsqy25ki37k5ln";
aarch64-linux = "1k9qvymc7yfq8ihlbx8676gsjyfhg41acc5p4lrw9ci0a3sqanz9";
aarch64-darwin = "029sdf0h9fcviv6qdphzlgb1qhy24vj79h465mf559gdih21xlp4";
armv7l-linux = "16lwgagg2i6mwqm3p2z97di571wgl2hj255pnxqhcz6x9vq26l8p";
x86_64-linux = "0xbnyi6g5a12bip1vh2b5ap5108gwxa9g9g3ncllllz3ak2jim5r";
x86_64-darwin = "0linvibppgjr4dwsrjpqd126m8izq757cnwkr0w4bv81k30j1jv6";
aarch64-linux = "1324p9av9vx8ywz55vdls53b34jp6csnqbm0y94v5azxjvwcr3kj";
aarch64-darwin = "160mwlz17fb0xq935ih35h8bd7dn7gmvy5szra0jdr754xcgn5z5";
armv7l-linux = "07dln5mgrhn0569m77rj30443hgk1z7z8xi442lh5y8ib729q10y";
}.${system} or throwSystem;
sourceRoot = lib.optionalString (!stdenv.hostPlatform.isDarwin) ".";
@@ -29,7 +29,7 @@ in
# Please backport all compatible updates to the stable release.
# This is important for the extension ecosystem.
version = "1.94.1.24283";
version = "1.94.2.24284";
pname = "vscodium";
executableName = "codium";
+2 -2
View File
@@ -19,13 +19,13 @@ let
in
stdenv.mkDerivation rec {
pname = "p2pool";
version = "4.1";
version = "4.1.1";
src = fetchFromGitHub {
owner = "SChernykh";
repo = "p2pool";
rev = "v${version}";
hash = "sha256-eMg8DXFtVfYhl6vpg/KRUZUgMU/XsCS29Af1CSIbUsY=";
hash = "sha256-rxsKbrgDdVtGEv63SHi3FbFpqU2j6ESksq0SDm78j+0=";
fetchSubmodules = true;
};
@@ -20,7 +20,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "palemoon-bin";
version = "33.3.1";
version = "33.4.0.1";
src = finalAttrs.passthru.sources."gtk${if withGTK3 then "3" else "2"}";
@@ -158,11 +158,11 @@ stdenv.mkDerivation (finalAttrs: {
in {
gtk3 = fetchzip {
urls = urlRegionVariants "gtk3";
hash = "sha256-auo45tzMY6bKahSEmUrkcYnz7v+GFbsrG+ePAKRC00U=";
hash = "sha256-34x9L0L42KO7mUDaW41I71ln5xyHGAKBoAJ6HcDC//g=";
};
gtk2 = fetchzip {
urls = urlRegionVariants "gtk2";
hash = "sha256-7qrT5fSfwcEAkbq8g/HRoUiDv5+qrzpiysjHTdZVgLc=";
hash = "sha256-TRIgfqKsJxueZ/Oazw7kTLjVyxdh+IUiR+XDaemow9A=";
};
};
@@ -62,8 +62,8 @@ rec {
};
kops_1_29 = mkKops rec {
version = "1.30.1";
sha256 = "sha256-aj2OnjkXlBEH830RoJiAlhiFfS1zjVoX38PrsgAaB7A=";
version = "1.29.2";
sha256 = "sha256-SRj0x9N+yfTG/UL/hu1ds46Zt6d5SUYU0PA9lPHO6jQ=";
rev = "v${version}";
};
@@ -1,14 +1,18 @@
{ lib, stdenv, fetchFromGitHub }:
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation rec {
pname = "bakelite";
version = "unstable-2022-02-12";
version = "unstable-2023-03-30";
src = fetchFromGitHub {
owner = "richfelker";
repo = pname;
rev = "373901734d114e42aa385e6a7843745674e4ca08";
hash = "sha256-HBnYlUyTkvPTbdsZD02yCq5C7yXOHYK4l4mDRUkcN5I=";
rev = "65d69e88e0972d1493ebbd9bf9d1bfde36272636";
hash = "sha256-OjBw9aYD2h7BWYgQzZp03hGCyQcRgmm2AjrcT/QrQAo=";
};
hardeningEnable = [ "pie" ];
+47
View File
@@ -0,0 +1,47 @@
{
lib,
stdenv,
fetchFromGitLab,
ninja,
pkg-config,
meson,
libevent,
curl,
spdlog,
}:
stdenv.mkDerivation rec {
pname = "coeurl";
version = "0.3.1";
src = fetchFromGitLab {
domain = "nheko.im";
owner = "nheko-reborn";
repo = pname;
rev = "v${version}";
hash = "sha256-NGplM5c/dMGSQbhKeuPOTWL8KsqvMd/76YuwCxnqNNE=";
};
postPatch = ''
substituteInPlace subprojects/curl.wrap --replace '[provides]' '[provide]'
'';
nativeBuildInputs = [
ninja
pkg-config
meson
];
buildInputs = [
libevent
curl
spdlog
];
meta = with lib; {
description = "Simple async wrapper around CURL for C++";
homepage = "https://nheko.im/nheko-reborn/coeurl";
license = licenses.mit;
platforms = platforms.all;
maintainers = with maintainers; [ rnhmjoj ];
};
}
@@ -6,14 +6,14 @@ Subject: [PATCH] Do not forcibly set OPENSSL_ROOT_DIR.
CMake can already find OpenSSL via pkg-config. Setting OPENSSL_ROOT_DIR
forcibly to "/usr" breaks this.
---
CMakeLists.txt | 11 -----------
1 file changed, 11 deletions(-)
CMakeLists.txt | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 288bcbe8..9750fae6 100644
index 0564bc8e..7b4c7f47 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -119,17 +119,6 @@ include(.CMake/compiler_opts.cmake)
@@ -144,15 +144,6 @@ include(.CMake/compiler_opts.cmake)
include(.CMake/alg_support.cmake)
if(${OQS_USE_OPENSSL})
@@ -24,13 +24,12 @@ index 288bcbe8..9750fae6 100644
- elseif(EXISTS "/opt/homebrew/opt/openssl@1.1")
- set(OPENSSL_ROOT_DIR "/opt/homebrew/opt/openssl@1.1")
- endif()
- elseif(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux")
- set(OPENSSL_ROOT_DIR "/usr")
- endif()
- endif()
find_package(OpenSSL 1.1.1 REQUIRED)
endif()
if(OQS_DLOPEN_OPENSSL)
--
2.42.0
+2 -2
View File
@@ -10,13 +10,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "liboqs";
version = "0.10.1";
version = "0.11.0";
src = fetchFromGitHub {
owner = "open-quantum-safe";
repo = "liboqs";
rev = finalAttrs.version;
hash = "sha256-zsSKFUs75K0Byxh3KVCZ8lIOf/vpbyMJXfk6fa2u+aE=";
hash = "sha256-+Gx1JPrJoeMix9DIF0rJQTivxN1lgaCIYFvJ1pnYZzM=";
};
patches = [
@@ -1,16 +1,17 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, pkg-config
, coeurl
, curl
, libevent
, nlohmann_json
, olm
, openssl
, re2
, spdlog
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
coeurl,
curl,
libevent,
nlohmann_json,
olm,
openssl,
re2,
spdlog,
}:
stdenv.mkDerivation rec {
@@ -56,7 +57,11 @@ stdenv.mkDerivation rec {
description = "Client API library for the Matrix protocol";
homepage = "https://github.com/Nheko-Reborn/mtxclient";
license = licenses.mit;
maintainers = with maintainers; [ fpletz pstn ];
maintainers = with maintainers; [
fpletz
pstn
rnhmjoj
];
platforms = platforms.all;
# Should be fixable if a higher clang version is used, see:
# https://github.com/NixOS/nixpkgs/pull/85922#issuecomment-619287177
@@ -1,32 +1,27 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, asciidoc
, pkg-config
, boost179
, cmark
, coeurl
, curl
, kdsingleapplication
, libevent
, libsecret
, lmdb
, lmdbxx
, mtxclient
, nlohmann_json
, olm
, qtbase
, qtimageformats
, qtkeychain
, qtmultimedia
, qttools
, qtwayland
, re2
, spdlog
, wrapQtAppsHook
, gst_all_1
, libnice
{
lib,
stdenv,
fetchFromGitHub,
cmake,
asciidoc,
pkg-config,
boost179,
cmark,
coeurl,
curl,
kdsingleapplication,
libevent,
libsecret,
lmdb,
lmdbxx,
mtxclient,
nlohmann_json,
olm,
re2,
spdlog,
gst_all_1,
libnice,
qt6Packages,
}:
stdenv.mkDerivation rec {
@@ -45,37 +40,38 @@ stdenv.mkDerivation rec {
cmake
lmdbxx
pkg-config
wrapQtAppsHook
qt6Packages.wrapQtAppsHook
];
buildInputs = [
boost179
cmark
coeurl
curl
kdsingleapplication
libevent
libsecret
lmdb
mtxclient
nlohmann_json
olm
qtbase
qtimageformats
qtkeychain
qtmultimedia
qttools
qtwayland
re2
spdlog
]
++ (with gst_all_1; [
gstreamer
gst-plugins-base
(gst-plugins-good.override { qt6Support = true; })
gst-plugins-bad
libnice
]);
buildInputs =
[
boost179
cmark
coeurl
curl
kdsingleapplication
libevent
libsecret
lmdb
mtxclient
nlohmann_json
olm
qt6Packages.qtbase
qt6Packages.qtimageformats
qt6Packages.qtkeychain
qt6Packages.qtmultimedia
qt6Packages.qttools
qt6Packages.qtwayland
re2
spdlog
]
++ (with gst_all_1; [
gstreamer
gst-plugins-base
(gst-plugins-good.override { qt6Support = true; })
gst-plugins-bad
libnice
]);
cmakeFlags = [
"-DCOMPILE_QML=ON" # see https://github.com/Nheko-Reborn/nheko/issues/389
@@ -91,7 +87,11 @@ stdenv.mkDerivation rec {
homepage = "https://github.com/Nheko-Reborn/nheko";
license = licenses.gpl3Plus;
mainProgram = "nheko";
maintainers = with maintainers; [ ekleog fpletz ];
maintainers = with maintainers; [
ekleog
fpletz
rnhmjoj
];
platforms = platforms.all;
# Should be fixable if a higher clang version is used, see:
# https://github.com/NixOS/nixpkgs/pull/85922#issuecomment-619287177
+2 -2
View File
@@ -42,13 +42,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "open-vm-tools";
version = "12.4.5";
version = "12.5.0";
src = fetchFromGitHub {
owner = "vmware";
repo = "open-vm-tools";
rev = "stable-${finalAttrs.version}";
hash = "sha256-VMnxWKGBgwnkP9eSVm///d6THzzWgUe5kNj/lGVBVlc=";
hash = "sha256-pjMXhVN4xdmPCk1Aeb83VZjDJ1t1mb9wryC6h3O+Qvc=";
};
sourceRoot = "${finalAttrs.src.name}/open-vm-tools";
+2 -2
View File
@@ -8,13 +8,13 @@
}:
stdenv.mkDerivation (finalAttrs: {
name = "oqs-provider";
version = "0.6.1";
version = "0.7.0";
src = fetchFromGitHub {
owner = "open-quantum-safe";
repo = "oqs-provider";
rev = finalAttrs.version;
hash = "sha256-AW0rOszXm9Hy55b2fQ2mpZulhXjYwvztwL6DIFgIzjA=";
hash = "sha256-2+TpYpZwC8vx6tGgS2waD/BQDfnbq0PJIwvX5wDDBEg=";
};
nativeBuildInputs = [
+3 -3
View File
@@ -12,16 +12,16 @@
buildNpmPackage rec {
pname = "ytDownloader";
version = "3.18.2";
version = "3.18.3";
src = fetchFromGitHub {
owner = "aandrew-me";
repo = "ytDownloader";
rev = "refs/tags/v${version}";
hash = "sha256-j6FeRqAeqXLofvI5R7nOwfg6wd17Xk85vryktGfnxyI=";
hash = "sha256-omq1krlHj0+SvyofQtJnVBiQzHPIC/v/WhXGClm0vzM=";
};
npmDepsHash = "sha256-LUlpyzHJDpjytZmMjjn899NKwvb80a0DXdMhVT2aRTY=";
npmDepsHash = "sha256-PE9RWdnUlHTCBqGN6xvq+B7gXke/KsKsGcg1SAy7bfs=";
nativeBuildInputs = [
copyDesktopItems
@@ -1,55 +0,0 @@
{ lib
, stdenv
, fetchFromGitLab
, fetchpatch
, ninja
, pkg-config
, meson
, libevent
, curl
, spdlog
}:
stdenv.mkDerivation rec {
pname = "coeurl";
version = "0.3.0";
src = fetchFromGitLab {
domain = "nheko.im";
owner = "nheko-reborn";
repo = pname;
rev = "v${version}";
hash = "sha256-sN+YSddUOdnJLcnHyWdjNm1PpxCwnkwiqSvyrwUrg6w=";
};
patches = [
# Fix compatibility issues with curl > 7.85, see:
# https://nheko.im/nheko-reborn/coeurl/-/commit/d926893007c353fbc149d8538a5762ca8384273a
# PATCH CAN BE REMOVED AFTER 0.3.0
(fetchpatch {
url = "https://nheko.im/nheko-reborn/coeurl/-/commit/d926893007c353fbc149d8538a5762ca8384273a.patch";
hash = "sha256-hOBk7riuVI7k7qe/SMq3XJnFzyZ0gB9kVG7dKvWOsPY=";
})
# Fix error when building with fmt >= 10, see:
# https://nheko.im/nheko-reborn/coeurl/-/commit/831e2ee8e9cf08ea1ee9736cde8370f9d0312abc
# PATCH CAN BE REMOVED AFTER 0.3.0
(fetchpatch {
url = "https://nheko.im/nheko-reborn/coeurl/-/commit/831e2ee8e9cf08ea1ee9736cde8370f9d0312abc.patch";
hash = "sha256-a52Id7Nm3Mmmwv7eL58j6xovjlkpAO4KahVM/Q3H65w=";
})
];
postPatch = ''
substituteInPlace subprojects/curl.wrap --replace '[provides]' '[provide]'
'';
nativeBuildInputs = [ ninja pkg-config meson ];
buildInputs = [ libevent curl spdlog ];
meta = with lib; {
description = "Simple async wrapper around CURL for C++";
homepage = "https://nheko.im/nheko-reborn/coeurl";
license = licenses.mit;
platforms = platforms.all;
maintainers = with maintainers; [ rnhmjoj ];
};
}
@@ -28,14 +28,14 @@
buildPythonPackage rec {
pname = "sentence-transformers";
version = "3.1.1";
version = "3.2.0";
pyproject = true;
src = fetchFromGitHub {
owner = "UKPLab";
repo = "sentence-transformers";
rev = "refs/tags/v${version}";
hash = "sha256-YtAgv0vH2aL7UX3ETVfwDEQYEWYo5Pj/R45CeH7T3BU=";
hash = "sha256-T9y+usEOqz53Wv5gObD5o3gAlABHM3apoq/ySD5ynVg=";
};
build-system = [ setuptools ];
@@ -8,13 +8,13 @@
buildPythonPackage rec {
pname = "spark-parser";
version = "1.8.9";
version = "1.9.0";
format = "setuptools";
src = fetchPypi {
pname = "spark_parser";
inherit version;
sha256 = "0np2y4jcir4a4j18wws7yzkz2zj6nqhdhn41rpq8pyskg6wrgfx7";
sha256 = "sha256-3GbUjEJlxBM9tBqcX+nBxQKzsgFn3xWKDyNM0xcSz2Q=";
};
propagatedBuildInputs = [ click ];
@@ -57,7 +57,7 @@
grpcio,
}:
let
version = "0.15.13";
version = "0.15.14";
optional-dependencies = {
huggingflace = [
langdetect
@@ -100,7 +100,7 @@ buildPythonPackage {
owner = "Unstructured-IO";
repo = "unstructured";
rev = "refs/tags/${version}";
hash = "sha256-DbOuNh+p+4vsEO6AQUeMq25RTLm5Zn9FyzcTKJedbTM=";
hash = "sha256-cIMKaSKG4T832rpiJeiwftqVrcMezD9ICfislGPV/TQ=";
};
propagatedBuildInputs = [
+16 -6
View File
@@ -6,13 +6,13 @@
buildGoModule rec {
pname = "apko";
version = "0.14.1";
version = "0.19.1";
src = fetchFromGitHub {
owner = "chainguard-dev";
repo = pname;
rev = "v${version}";
hash = "sha256-O1lU3b3dNmFcV0Dfkpw63Eu6AgLSLBi7MbF47OsjgL4=";
hash = "sha256-uUsNYQPW2MtXxohdenXbNWfikp8TW0chJ5SDYU8ayV4=";
# populate values that require us to use git. By doing this in postFetch we
# can delete .git afterwards and maintain better reproducibility of the src.
leaveDotGit = true;
@@ -24,7 +24,7 @@ buildGoModule rec {
find "$out" -name .git -print0 | xargs -0 rm -rf
'';
};
vendorHash = "sha256-shnVJ6TcqWxUu1Ib2ewaz2VK4mi1Rt3R0Cmof9ilDJ4=";
vendorHash = "sha256-2Tuhya70R++Nv5KEd+4vjxiTTansraSXQtGm/FqRktk=";
nativeBuildInputs = [ installShellFiles ];
@@ -41,9 +41,19 @@ buildGoModule rec {
ldflags+=" -X sigs.k8s.io/release-utils/version.buildDate=$(cat SOURCE_DATE_EPOCH)"
'';
preCheck = ''
# some tests require a writable HOME
export HOME=$(mktemp -d)
# some test data include SOURCE_DATE_EPOCH (which is different from our default)
# and the default version info which we get by unsetting our ldflags
export SOURCE_DATE_EPOCH=0
ldflags=
'';
checkFlags = [
# fails to run on read-only filesystem
"-skip=(TestPublish|TestBuild|TestTarFS)"
# requires networking (apk.chainreg.biz)
"-skip=TestInitDB_ChainguardDiscovery"
];
postInstall = ''
@@ -69,6 +79,6 @@ buildGoModule rec {
description = "Build OCI images using APK directly without Dockerfile";
mainProgram = "apko";
license = licenses.asl20;
maintainers = with maintainers; [ jk developer-guy ];
maintainers = with maintainers; [ jk developer-guy emilylange ];
};
}
@@ -1,7 +1,6 @@
{ lib
, buildGoModule
, fetchFromGitHub
, fetchpatch
, installShellFiles
, testers
, go-task
@@ -20,16 +19,6 @@ buildGoModule rec {
vendorHash = "sha256-P9J69WJ2C2xgdU9xydiaY8iSKB7ZfexLNYi7dyHDTIk=";
patches = [
# fix version resolution when passed in though ldflags
# remove on next release
(fetchpatch {
name = "fix-ldflags-version.patch";
url = "https://github.com/go-task/task/commit/9ee4f21d62382714ac829df6f9bbf1637406eb5b.patch?full_index=1";
hash = "sha256-wu5//aZ/vzuObb03AjUUlVFjPr175mn1vVAZgqSGIZ0=";
})
];
doCheck = false;
nativeBuildInputs = [ installShellFiles ];
+29 -9
View File
@@ -109,18 +109,21 @@ rec {
singleIniAtom = nullOr (oneOf [ bool int float str ]) // {
description = "INI atom (null, bool, int, float or string)";
};
iniAtom = { listsAsDuplicateKeys, listToValue }:
iniAtom = { listsAsDuplicateKeys, listToValue, atomsCoercedToLists }:
let
singleIniAtomOr = if atomsCoercedToLists then coercedTo singleIniAtom lib.singleton else either singleIniAtom;
in
if listsAsDuplicateKeys then
coercedTo singleIniAtom lib.singleton (listOf singleIniAtom) // {
singleIniAtomOr (listOf singleIniAtom) // {
description = singleIniAtom.description + " or a list of them for duplicate keys";
}
else if listToValue != null then
coercedTo singleIniAtom lib.singleton (nonEmptyListOf singleIniAtom) // {
singleIniAtomOr (nonEmptyListOf singleIniAtom) // {
description = singleIniAtom.description + " or a non-empty list of them";
}
else
singleIniAtom;
iniSection = { listsAsDuplicateKeys, listToValue }@args:
iniSection = { listsAsDuplicateKeys, listToValue, atomsCoercedToLists }@args:
attrsOf (iniAtom args) // {
description = "section of an INI file (attrs of " + (iniAtom args).description + ")";
};
@@ -133,18 +136,26 @@ rec {
# Alternative to listsAsDuplicateKeys, converts list to non-list
# listToValue :: [IniAtom] -> IniAtom
listToValue ? null,
# Merge multiple instances of the same key into a list
atomsCoercedToLists ? null,
...
}@args:
assert listsAsDuplicateKeys -> listToValue == null;
assert atomsCoercedToLists != null -> (listsAsDuplicateKeys || listToValue != null);
let
atomsCoercedToLists' = if atomsCoercedToLists == null then false else atomsCoercedToLists;
in
{
type = lib.types.attrsOf (iniSection { listsAsDuplicateKeys = listsAsDuplicateKeys; listToValue = listToValue; });
type = lib.types.attrsOf (
iniSection { inherit listsAsDuplicateKeys listToValue; atomsCoercedToLists = atomsCoercedToLists'; }
);
generate = name: value:
lib.pipe value
[
(lib.mapAttrs (_: maybeToList listToValue))
(lib.generators.toINI (removeAttrs args ["listToValue"]))
(lib.generators.toINI (removeAttrs args ["listToValue" "atomsCoercedToLists"]))
(pkgs.writeText name)
];
};
@@ -155,26 +166,34 @@ rec {
# Alternative to listsAsDuplicateKeys, converts list to non-list
# listToValue :: [IniAtom] -> IniAtom
listToValue ? null,
# Merge multiple instances of the same key into a list
atomsCoercedToLists ? null,
...
}@args:
assert listsAsDuplicateKeys -> listToValue == null;
assert atomsCoercedToLists != null -> (listsAsDuplicateKeys || listToValue != null);
let
atomsCoercedToLists' = if atomsCoercedToLists == null then false else atomsCoercedToLists;
in
{
type = lib.types.submodule {
options = {
sections = lib.mkOption rec {
type = lib.types.attrsOf (iniSection { listsAsDuplicateKeys = listsAsDuplicateKeys; listToValue = listToValue; });
type = lib.types.attrsOf (
iniSection { inherit listsAsDuplicateKeys listToValue; atomsCoercedToLists = atomsCoercedToLists'; }
);
default = {};
description = type.description;
};
globalSection = lib.mkOption rec {
type = iniSection { listsAsDuplicateKeys = listsAsDuplicateKeys; listToValue = listToValue; };
type = iniSection { inherit listsAsDuplicateKeys listToValue; atomsCoercedToLists = atomsCoercedToLists'; };
default = {};
description = "global " + type.description;
};
};
};
generate = name: { sections ? {}, globalSection ? {}, ... }:
pkgs.writeText name (lib.generators.toINIWithGlobalSection (removeAttrs args ["listToValue"])
pkgs.writeText name (lib.generators.toINIWithGlobalSection (removeAttrs args ["listToValue" "atomsCoercedToLists"])
{
globalSection = maybeToList listToValue globalSection;
sections = lib.mapAttrs (_: maybeToList listToValue) sections;
@@ -186,6 +205,7 @@ rec {
atom = iniAtom {
listsAsDuplicateKeys = listsAsDuplicateKeys;
listToValue = null;
atomsCoercedToLists = false;
};
in attrsOf (attrsOf (either atom (attrsOf atom)));
+137
View File
@@ -222,6 +222,67 @@ in runBuildTests {
'';
};
iniCoercedDuplicateKeys = shouldPass rec {
format = formats.ini {
listsAsDuplicateKeys = true;
atomsCoercedToLists = true;
};
input = format.type.merge [ ] [
{
file = "format-test-inner-iniCoercedDuplicateKeys";
value = { foo = { bar = 1; }; };
}
{
file = "format-test-inner-iniCoercedDuplicateKeys";
value = { foo = { bar = 2; }; };
}
];
expected = ''
[foo]
bar=1
bar=2
'';
};
iniCoercedListToValue = shouldPass rec {
format = formats.ini {
listToValue = lib.concatMapStringsSep ", " (lib.generators.mkValueStringDefault { });
atomsCoercedToLists = true;
};
input = format.type.merge [ ] [
{
file = "format-test-inner-iniCoercedListToValue";
value = { foo = { bar = 1; }; };
}
{
file = "format-test-inner-iniCoercedListToValue";
value = { foo = { bar = 2; }; };
}
];
expected = ''
[foo]
bar=1, 2
'';
};
iniCoercedNoLists = shouldFail {
format = formats.ini { atomsCoercedToLists = true; };
input = {
foo = {
bar = 1;
};
};
};
iniNoCoercedNoLists = shouldFail {
format = formats.ini { atomsCoercedToLists = false; };
input = {
foo = {
bar = 1;
};
};
};
iniWithGlobalNoSections = shouldPass {
format = formats.iniWithGlobalSection {};
input = {};
@@ -317,6 +378,82 @@ in runBuildTests {
'';
};
iniWithGlobalCoercedDuplicateKeys = shouldPass rec {
format = formats.iniWithGlobalSection {
listsAsDuplicateKeys = true;
atomsCoercedToLists = true;
};
input = format.type.merge [ ] [
{
file = "format-test-inner-iniWithGlobalCoercedDuplicateKeys";
value = {
globalSection = { baz = 4; };
sections = { foo = { bar = 1; }; };
};
}
{
file = "format-test-inner-iniWithGlobalCoercedDuplicateKeys";
value = {
globalSection = { baz = 3; };
sections = { foo = { bar = 2; }; };
};
}
];
expected = ''
baz=3
baz=4
[foo]
bar=2
bar=1
'';
};
iniWithGlobalCoercedListToValue = shouldPass rec {
format = formats.iniWithGlobalSection {
listToValue = lib.concatMapStringsSep ", " (lib.generators.mkValueStringDefault { });
atomsCoercedToLists = true;
};
input = format.type.merge [ ] [
{
file = "format-test-inner-iniWithGlobalCoercedListToValue";
value = {
globalSection = { baz = 4; };
sections = { foo = { bar = 1; }; };
};
}
{
file = "format-test-inner-iniWithGlobalCoercedListToValue";
value = {
globalSection = { baz = 3; };
sections = { foo = { bar = 2; }; };
};
}
];
expected = ''
baz=3, 4
[foo]
bar=2, 1
'';
};
iniWithGlobalCoercedNoLists = shouldFail {
format = formats.iniWithGlobalSection { atomsCoercedToLists = true; };
input = {
globalSection = { baz = 4; };
foo = { bar = 1; };
};
};
iniWithGlobalNoCoercedNoLists = shouldFail {
format = formats.iniWithGlobalSection { atomsCoercedToLists = false; };
input = {
globalSection = { baz = 4; };
foo = { bar = 1; };
};
};
keyValueAtoms = shouldPass {
format = formats.keyValue {};
input = {
+2 -2
View File
@@ -9,7 +9,7 @@
# TODO: Go back to using buildGoModule when upgrading to grafana 11.3.
buildGo122Module rec {
pname = "grafana";
version = "11.2.1";
version = "11.2.2";
subPackages = [ "pkg/cmd/grafana" "pkg/cmd/grafana-server" "pkg/cmd/grafana-cli" ];
@@ -17,7 +17,7 @@ buildGo122Module rec {
owner = "grafana";
repo = "grafana";
rev = "v${version}";
hash = "sha256-rMRzrGdTPfGzMtE3xej5dSOjyyEMn66oPjDUWifMjnQ=";
hash = "sha256-rELvOqKVf/Dmh38fxvvFzNM9zRQF9J8OyidXJvuubzs=";
};
# borrowed from: https://github.com/NixOS/nixpkgs/blob/d70d9425f49f9aba3c49e2c389fe6d42bac8c5b0/pkgs/development/tools/analysis/snyk/default.nix#L20-L22
+3 -9
View File
@@ -281,7 +281,9 @@ with pkgs;
fission = callPackage ../development/tools/fission { };
apko = callPackage ../development/tools/apko { };
apko = callPackage ../development/tools/apko {
buildGoModule = buildGo123Module;
};
melange = callPackage ../development/tools/melange { };
@@ -313,8 +315,6 @@ with pkgs;
beeper = callPackage ../applications/networking/instant-messengers/beeper { };
bakelite = callPackage ../tools/backup/bakelite { };
bearer = callPackage ../development/tools/bearer { };
benthos = callPackage ../development/tools/benthos { };
@@ -19164,8 +19164,6 @@ with pkgs;
protobuf = protobuf_21;
};
coeurl = callPackage ../development/libraries/coeurl { };
coercer = callPackage ../tools/security/coercer { };
cogl = callPackage ../development/libraries/cogl {
@@ -22133,8 +22131,6 @@ with pkgs;
mtpfs = callPackage ../tools/filesystems/mtpfs { };
mtxclient = callPackage ../development/libraries/mtxclient { };
mu = callPackage ../tools/networking/mu { };
mueval = callPackage ../development/tools/haskell/mueval { };
@@ -31570,8 +31566,6 @@ with pkgs;
ngt = callPackage ../development/libraries/ngt { };
nheko = qt6Packages.callPackage ../applications/networking/instant-messengers/nheko { };
notepad-next = libsForQt5.callPackage ../applications/editors/notepad-next { };
notepadqq = libsForQt5.callPackage ../applications/editors/notepadqq { };