Merge staging-next-22.11 into staging-22.11

This commit is contained in:
github-actions[bot]
2023-01-07 00:13:31 +00:00
committed by GitHub
30 changed files with 192 additions and 71 deletions

View File

@@ -127,14 +127,15 @@ let
mkAliasAndWrapDefinitions fixMergeModules mkRemovedOptionModule
mkRenamedOptionModule mkRenamedOptionModuleWith
mkMergedOptionModule mkChangedOptionModule
mkAliasOptionModule mkDerivedConfig doRename;
mkAliasOptionModule mkDerivedConfig doRename
mkAliasOptionModuleMD;
inherit (self.options) isOption mkEnableOption mkSinkUndeclaredOptions
mergeDefaultOption mergeOneOption mergeEqualOption mergeUniqueOption
getValues getFiles
optionAttrSetToDocList optionAttrSetToDocList'
scrubOptionValue literalExpression literalExample literalDocBook
showOption showOptionWithDefLocs showFiles
unknownModule mkOption mkPackageOption
unknownModule mkOption mkPackageOption mkPackageOptionMD
mdDoc literalMD;
inherit (self.types) isType setType defaultTypeMerge defaultFunctor
isOptionType mkOptionType;

View File

@@ -157,6 +157,11 @@ rec {
${if prefix == []
then null # unset => visible
else "internal"} = true;
# TODO: hidden during the markdown transition to not expose downstream
# users of the docs infra to markdown if they're not ready for it.
# we don't make this visible conditionally because it can impact
# performance (https://github.com/NixOS/nixpkgs/pull/208407#issuecomment-1368246192)
visible = false;
# TODO: Change the type of this option to a submodule with a
# freeformType, so that individual arguments can be documented
# separately
@@ -1107,6 +1112,15 @@ rec {
visible = true;
warn = false;
use = id;
wrapDescription = lib.id;
};
/* Transitional version of mkAliasOptionModule that uses MD docs. */
mkAliasOptionModuleMD = from: to: doRename {
inherit from to;
visible = true;
warn = false;
use = id;
};
/* mkDerivedConfig : Option a -> (a -> Definition b) -> Definition b
@@ -1129,7 +1143,7 @@ rec {
(opt.highestPrio or defaultPriority)
(f opt.value);
doRename = { from, to, visible, warn, use, withPriority ? true }:
doRename = { from, to, visible, warn, use, withPriority ? true, wrapDescription ? lib.mdDoc }:
{ config, options, ... }:
let
fromOpt = getAttrFromPath from options;
@@ -1140,7 +1154,7 @@ rec {
{
options = setAttrByPath from (mkOption {
inherit visible;
description = lib.mdDoc "Alias of {option}`${showOption to}`.";
description = wrapDescription "Alias of {option}`${showOption to}`.";
apply = x: use (toOf config);
} // optionalAttrs (toType != null) {
type = toType;

View File

@@ -136,7 +136,7 @@ rec {
let default' = if !isList default then [ default ] else default;
in mkOption {
type = lib.types.package;
description = lib.mdDoc "The ${name} package to use.";
description = "The ${name} package to use.";
default = attrByPath default'
(throw "${concatStringsSep "." default'} cannot be found in pkgs") pkgs;
defaultText = literalExpression ("pkgs." + concatStringsSep "." default');
@@ -144,6 +144,11 @@ rec {
(if isList example then "pkgs." + concatStringsSep "." example else example);
};
/* Like mkPackageOption, but emit an mdDoc description instead of DocBook. */
mkPackageOptionMD = args: name: extra:
let option = mkPackageOption args name extra;
in option // { description = lib.mdDoc option.description; };
/* This option accepts anything, but it does not produce any result.
This is useful for sharing a module across different module sets

View File

@@ -88,7 +88,7 @@ lib.mkOption {
}
```
### `mkPackageOption` {#sec-option-declarations-util-mkPackageOption}
### `mkPackageOption`, `mkPackageOptionMD` {#sec-option-declarations-util-mkPackageOption}
Usage:
@@ -106,6 +106,8 @@ The second argument is the name of the option, used in the description "The \<na
You can omit the default path if the name of the option is also attribute path in nixpkgs.
During the transition to CommonMark documentation `mkPackageOption` creates an option with a DocBook description attribute, once the transition is completed it will create a CommonMark description instead. `mkPackageOptionMD` always creates an option with a CommonMark description attribute and will be removed some time after the transition is completed.
::: {#ex-options-declarations-util-mkPackageOption .title}
Examples:

View File

@@ -138,7 +138,8 @@ lib.mkOption {
}
</programlisting>
<section xml:id="sec-option-declarations-util-mkPackageOption">
<title><literal>mkPackageOption</literal></title>
<title><literal>mkPackageOption</literal>,
<literal>mkPackageOptionMD</literal></title>
<para>
Usage:
</para>
@@ -172,6 +173,15 @@ mkPackageOption pkgs &quot;name&quot; { default = [ &quot;path&quot; &quot;in&qu
You can omit the default path if the name of the option is
also attribute path in nixpkgs.
</para>
<para>
During the transition to CommonMark documentation
<literal>mkPackageOption</literal> creates an option with a
DocBook description attribute, once the transition is
completed it will create a CommonMark description instead.
<literal>mkPackageOptionMD</literal> always creates an option
with a CommonMark description attribute and will be removed
some time after the transition is completed.
</para>
<anchor xml:id="ex-options-declarations-util-mkPackageOption" />
<para>
Examples:

View File

@@ -306,14 +306,17 @@ if hasDocBookErrors:
print("Explanation: The documentation contains descriptions, examples, or defaults written in DocBook. " +
"NixOS is in the process of migrating from DocBook to Markdown, and " +
"DocBook is disallowed for in-tree modules. To change your contribution to "+
"use Markdown, apply mdDoc and literalMD. For example:\n" +
"use Markdown, apply mdDoc and literalMD and use the *MD variants of option creation " +
"functions where they are available. For example:\n" +
"\n" +
" example.foo = mkOption {\n" +
" description = lib.mdDoc ''your description'';\n" +
" defaultText = lib.literalMD ''your description of default'';\n" +
" }\n" +
" };\n" +
"\n" +
" example.enable = mkEnableOption (lib.mdDoc ''your thing'');",
" example.enable = mkEnableOption (lib.mdDoc ''your thing'');\n" +
" example.package = mkPackageOptionMD pkgs \"your-package\" {};\n" +
" imports = [ (mkAliasOptionModuleMD [ \"example\" \"args\" ] [ \"example\" \"settings\" ]) ];",
file = sys.stderr)
if hasErrors:

View File

@@ -447,8 +447,8 @@ let
in {
imports = [
(mkAliasOptionModule [ "users" "extraUsers" ] [ "users" "users" ])
(mkAliasOptionModule [ "users" "extraGroups" ] [ "users" "groups" ])
(mkAliasOptionModuleMD [ "users" "extraUsers" ] [ "users" "users" ])
(mkAliasOptionModuleMD [ "users" "extraGroups" ] [ "users" "groups" ])
(mkRenamedOptionModule ["security" "initialRootPassword"] ["users" "users" "root" "initialHashedPassword"])
];

View File

@@ -27,7 +27,7 @@ in
'';
};
package = mkPackageOption pkgs "1Password GUI" {
package = mkPackageOptionMD pkgs "1Password GUI" {
default = [ "_1password-gui" ];
};
};

View File

@@ -18,7 +18,7 @@ in
programs._1password = {
enable = mkEnableOption (lib.mdDoc "the 1Password CLI tool");
package = mkPackageOption pkgs "1Password CLI" {
package = mkPackageOptionMD pkgs "1Password CLI" {
default = [ "_1password" ];
};
};

View File

@@ -14,7 +14,7 @@ with lib;
# This alias module can't be where _module.check is defined because it would
# be added to submodules as well there
(mkAliasOptionModule [ "environment" "checkConfigurationOptions" ] [ "_module" "check" ])
(mkAliasOptionModuleMD [ "environment" "checkConfigurationOptions" ] [ "_module" "check" ])
# Completely removed modules
(mkRemovedOptionModule [ "environment" "blcr" "enable" ] "The BLCR module has been removed")

View File

@@ -55,7 +55,7 @@ in
services.dgraph = {
enable = mkEnableOption (lib.mdDoc "Dgraph native GraphQL database with a graph backend");
package = lib.mkPackageOption pkgs "dgraph" { };
package = lib.mkPackageOptionMD pkgs "dgraph" { };
settings = mkOption {
type = settingsFormat.type;

View File

@@ -128,7 +128,7 @@ in {
'';
};
};
package = mkPackageOption pkgs "listmonk" {};
package = mkPackageOptionMD pkgs "listmonk" {};
settings = mkOption {
type = types.submodule { freeformType = tomlFormat.type; };
description = lib.mdDoc ''

View File

@@ -7,7 +7,7 @@ let cfg = config.services.input-remapper; in
options = {
services.input-remapper = {
enable = mkEnableOption (lib.mdDoc "input-remapper, an easy to use tool to change the mapping of your input device buttons.");
package = options.mkPackageOption pkgs "input-remapper" { };
package = mkPackageOptionMD pkgs "input-remapper" { };
enableUdevRules = mkEnableOption (lib.mdDoc "udev rules added by input-remapper to handle hotplugged devices. Currently disabled by default due to https://github.com/sezanzeb/input-remapper/issues/140");
serviceWantedBy = mkOption {
default = [ "graphical.target" ];

View File

@@ -13,7 +13,7 @@ in
services.polaris = {
enable = mkEnableOption (lib.mdDoc "Polaris Music Server");
package = mkPackageOption pkgs "polaris" { };
package = mkPackageOptionMD pkgs "polaris" { };
user = mkOption {
type = types.str;

View File

@@ -115,7 +115,7 @@ let
};
in {
options.networking.openconnect = {
package = mkPackageOption pkgs "openconnect" { };
package = mkPackageOptionMD pkgs "openconnect" { };
interfaces = mkOption {
description = lib.mdDoc "OpenConnect interfaces.";

View File

@@ -14,7 +14,7 @@ in
enable = mkEnableOption (lib.mdDoc "ShellHub Agent daemon");
package = mkPackageOption pkgs "shellhub-agent" { };
package = mkPackageOptionMD pkgs "shellhub-agent" { };
preferredHostname = mkOption {
type = types.str;

View File

@@ -79,8 +79,8 @@ in
{
imports = [
(mkAliasOptionModule [ "services" "sshd" "enable" ] [ "services" "openssh" "enable" ])
(mkAliasOptionModule [ "services" "openssh" "knownHosts" ] [ "programs" "ssh" "knownHosts" ])
(mkAliasOptionModuleMD [ "services" "sshd" "enable" ] [ "services" "openssh" "enable" ])
(mkAliasOptionModuleMD [ "services" "openssh" "knownHosts" ] [ "programs" "ssh" "knownHosts" ])
(mkRenamedOptionModule [ "services" "openssh" "challengeResponseAuthentication" ] [ "services" "openssh" "kbdInteractiveAuthentication" ])
];

View File

@@ -71,7 +71,7 @@ in
services.vdirsyncer = {
enable = mkEnableOption (mdDoc "vdirsyncer");
package = mkPackageOption pkgs "vdirsyncer" {};
package = mkPackageOptionMD pkgs "vdirsyncer" {};
jobs = mkOption {
description = mdDoc "vdirsyncer job configurations";

View File

@@ -19,8 +19,8 @@ in
imports = [
(mkRenamedOptionModule ["services" "transmission" "port"]
["services" "transmission" "settings" "rpc-port"])
(mkAliasOptionModule ["services" "transmission" "openFirewall"]
["services" "transmission" "openPeerPorts"])
(mkAliasOptionModuleMD ["services" "transmission" "openFirewall"]
["services" "transmission" "openPeerPorts"])
];
options = {
services.transmission = {

View File

@@ -41,7 +41,7 @@ let
in {
imports = [
(mkAliasOptionModule [ "services" "compton" ] [ "services" "picom" ])
(mkAliasOptionModuleMD [ "services" "compton" ] [ "services" "picom" ])
(mkRemovedOptionModule [ "services" "picom" "refreshRate" ] ''
This option corresponds to `refresh-rate`, which has been unused
since picom v6 and was subsequently removed by upstream.

View File

@@ -10,7 +10,7 @@ in
options.services.xserver.windowManager.qtile = {
enable = mkEnableOption (lib.mdDoc "qtile");
package = mkPackageOption pkgs "qtile" { };
package = mkPackageOptionMD pkgs "qtile" { };
};
config = mkIf cfg.enable {

View File

@@ -142,7 +142,7 @@ in {
'';
};
package = (mkPackageOption pkgs "systemd" {
package = (mkPackageOptionMD pkgs "systemd" {
default = "systemdStage1";
}) // {
visible = false;

View File

@@ -2,16 +2,16 @@
buildGoModule rec {
pname = "rmapi";
version = "0.0.22.1";
version = "0.0.25";
src = fetchFromGitHub {
owner = "juruen";
repo = "rmapi";
rev = "v${version}";
sha256 = "sha256-tYGlI7p5KAskN+Y6vvBEm4+s9rKtL4TN43N/btN27UI=";
sha256 = "sha256-7pwCd9tey7w5B8UgsMLHegPqmmY1prLM+Sk9o42X9lY=";
};
vendorSha256 = "sha256-LmKcHV0aq7NDEwaL+u8zXkbKzzdWD8zmnAGw5xShDYo=";
vendorSha256 = "sha256-Id2RaiSxthyR6egDQz2zulbSZ4STRTaA3yQIr6Mx9kg=";
doCheck = false;

View File

@@ -1,7 +1,7 @@
{ stdenv
, lib
, callPackage
, fetchFromGitHub
, fetchurl
, fetchpatch
, makeWrapper
, cmake
@@ -48,6 +48,7 @@
, patchRcPathFish
, patchRcPathPosix
, tbb
, xrootd
, Cocoa
, CoreSymbolication
, OpenGL
@@ -70,20 +71,21 @@ in
stdenv.mkDerivation rec {
pname = "root";
version = "6.26.08";
version = "6.26.10";
passthru = {
tests = import ./tests { inherit callPackage; };
};
src = fetchFromGitHub {
owner = "root-project";
repo = "root";
rev = "v${builtins.replaceStrings [ "." ] [ "-" ] version}";
sha256 = "sha256-cNd1GvEbO/a+WdDe8EHYGmdlw3TrOT2fWaSk+s7fw7U=";
src = fetchurl {
url = "https://root.cern.ch/download/root_v${version}.source.tar.gz";
hash = "sha256-jla+w5cQQBeqVPnrVU3noaE0R0/gs7sPQ6cPxPq9Yl8=";
};
nativeBuildInputs = [ makeWrapper cmake pkg-config git ];
propagatedBuildInputs = [
nlohmann_json
];
buildInputs = [
davix
ftgl
@@ -107,12 +109,12 @@ stdenv.mkDerivation rec {
libjpeg
libtiff
libpng
nlohmann_json
patchRcPathCsh
patchRcPathFish
patchRcPathPosix
python.pkgs.numpy
tbb
xrootd
]
++ lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext libGLU libGL ]
++ lib.optionals (stdenv.isDarwin) [ Cocoa CoreSymbolication OpenGL ]
@@ -195,7 +197,7 @@ stdenv.mkDerivation rec {
"-Dvdt=OFF"
"-Dwebgui=OFF"
"-Dxml=ON"
"-Dxrootd=OFF"
"-Dxrootd=ON"
]
++ lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${lib.getDev stdenv.cc.libc}/include"
++ lib.optionals stdenv.isDarwin [
@@ -207,19 +209,25 @@ stdenv.mkDerivation rec {
"-Druntime_cxxmodules=OFF"
];
NIX_LDFLAGS = lib.optionalString (stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU) "-lgcc";
# Workaround the xrootd runpath bug #169677 by prefixing [DY]LD_LIBRARY_PATH with ${lib.makeLibraryPath xrootd}.
# TODO: Remove the [DY]LDLIBRARY_PATH prefix for xrootd when #200830 get merged.
postInstall = ''
for prog in rootbrowse rootcp rooteventselector rootls rootmkdir rootmv rootprint rootrm rootslimtree; do
wrapProgram "$out/bin/$prog" \
--set PYTHONPATH "$out/lib" \
--set ${lib.optionalString stdenv.isDarwin "DY"}LD_LIBRARY_PATH "$out/lib"
--set ${lib.optionalString stdenv.isDarwin "DY"}LD_LIBRARY_PATH "$out/lib:${lib.makeLibraryPath [ xrootd ]}"
done
# Make ldd and sed available to the ROOT executable
wrapProgram "$out/bin/root" --prefix PATH : "${lib.makeBinPath [
gnused # sed
stdenv.cc # c++ ld etc.
stdenv.cc.libc # ldd
]}"
# Make ldd and sed available to the ROOT executable by prefixing PATH.
wrapProgram "$out/bin/root" \
--prefix PATH : "${lib.makeBinPath [
gnused # sed
stdenv.cc # c++ ld etc.
stdenv.cc.libc # ldd
]}" \
--prefix ${lib.optionalString stdenv.hostPlatform.isDarwin "DY"}LD_LIBRARY_PATH : "${lib.makeLibraryPath [ xrootd ]}"
# Patch thisroot.{sh,csh,fish}
@@ -262,9 +270,5 @@ stdenv.mkDerivation rec {
platforms = platforms.unix;
maintainers = [ maintainers.veprbl ];
license = licenses.lgpl21;
# See https://github.com/NixOS/nixpkgs/pull/192581#issuecomment-1256860426
# for some context on issues on aarch64.
broken = stdenv.isAarch64 && stdenv.isLinux;
};
}

View File

@@ -0,0 +1,38 @@
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, keyring
, setuptools-scm
}:
buildPythonPackage rec {
pname = "keyrings.passwordstore";
version = "0.1.0";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-pylZw45FUtLHzUV4cDyl/nT8tCZwNj4Jf41MMlyskoU=";
};
nativeBuildInputs = [
setuptools-scm
];
checkInputs = [
keyring
];
pythonImportsCheck = [
"keyrings.passwordstore.backend"
];
meta = {
license = lib.licenses.mit;
description = "Keyring backend for password-store";
homepage = "https://github.com/stv0g/keyrings.passwordstore";
maintainers = [ lib.maintainers.shlevy ];
};
}

View File

@@ -48,10 +48,16 @@
"version": "1.0.1"
},
"gutenberg": {
"path": "gutenberg/tags/14.8.4",
"rev": "2841225",
"sha256": "1nyyqrf61l17crw6pjq5pf9wa657sm0r85b0lxp0vzlpsfsvvw47",
"version": "14.8.4"
"path": "gutenberg/tags/14.9.0",
"rev": "2843613",
"sha256": "1aa27nmks0b411n13qsgk0xhh82n8cjpqxj6r4v55lfr835rr4av",
"version": "14.9.0"
},
"hkdev-maintenance-mode": {
"path": "hkdev-maintenance-mode/trunk",
"rev": "2826725",
"sha256": "1y70wksgj07n2yd10sg7vf0nddjw9g3vhyfxfbm57m1bb0826zpd",
"version": "2.2.6"
},
"jetpack": {
"path": "jetpack/tags/11.6",
@@ -102,10 +108,10 @@
"version": "0.9.3"
},
"webp-converter-for-media": {
"path": "webp-converter-for-media/tags/5.6.1",
"rev": "2840699",
"sha256": "1srrlrwxkv00j0wj0br5xjzfgwa2n4n0qr6b7xyzavxf7v0lnm7q",
"version": "5.6.1"
"path": "webp-converter-for-media/tags/5.6.2",
"rev": "2843800",
"sha256": "0yki15slmvvnc9511gsg7kkvmnic3cb0p7iz2lm90j4pdchz0api",
"version": "5.6.2"
},
"webp-express": {
"path": "webp-express/tags/0.25.5",
@@ -162,9 +168,9 @@
"version": "1.4.1"
},
"wpforms-lite": {
"path": "wpforms-lite/tags/1.7.8",
"rev": "2815943",
"sha256": "0xqnjxlj2m6zpcasj3gksg9qzjm8pynjr8sar8xbgfz8ichs5m6m",
"version": "1.7.8"
"path": "wpforms-lite/tags/1.7.9",
"rev": "2844054",
"sha256": "1hhcl75cb7njgch0app9kifl9fjznan1m4gqa3yc6kdhicjb5sz6",
"version": "1.7.9"
}
}

View File

@@ -8,6 +8,7 @@
, "co-authors-plus"
, "disable-xml-rpc"
, "gutenberg"
, "hkdev-maintenance-mode"
, "jetpack"
, "jetpack-lite"
, "lightbox-photoswipe"

View File

@@ -1,4 +1,12 @@
{ lib, stdenv, rustPlatform, fetchFromGitHub, fetchzip, androidenv, makeWrapper }:
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, fetchpatch
, fetchzip
, androidenv
, makeWrapper
}:
let
version = "2.5";
apk = stdenv.mkDerivation {
@@ -6,7 +14,7 @@ apk = stdenv.mkDerivation {
inherit version;
src = fetchzip {
url = "https://github.com/Genymobile/gnirehtet/releases/download/v${version}/gnirehtet-rust-linux64-v${version}.zip";
sha256 = "1db0gkg5z8lighhkyqfsr9jiacrck89zmfnmp74vj865hhxgjzgq";
hash = "sha256-+H35OoTFILnJudW6+hOaLDMVZcraYT8hfJGiX958YLU=";
};
installPhase = ''
mkdir $out
@@ -19,13 +27,38 @@ rustPlatform.buildRustPackage {
inherit version;
src = fetchFromGitHub {
owner = "Genymobile";
repo = "gnirehtet";
rev = "v${version}";
sha256 = "0wk6n082gnj9xk46n542h1012h8gyhldca23bs7vl73g0534g878";
owner = "Genymobile";
repo = "gnirehtet";
rev = "v${version}";
hash = "sha256-6KBHRgFvHLqPXkMo1ij0D0ERQICCFGvI7EnaJxCwZnI=";
};
sourceRoot = "source/relay-rust";
cargoSha256 = "03r8ivsvmhi5f32gj4yacbyzanziymszya18dani53bq9zis9z31";
cargoPatches = [
(fetchpatch {
name = "fix-trailing-semicolon-in-macro.patch";
url = "https://github.com/Genymobile/gnirehtet/commit/537b3d87344a456e1310f10dcef37592063f4e54.patch";
hash = "sha256-6U4ZEcqyXcXrfLRtynepS7gp+Uh5sujRyHVLXbWvpq8=";
stripLen = 1;
})
# Updates Cargo.lock and is needed to apply the subsequent patch
(fetchpatch {
name = "prefix-unused-field-with-underscore.patch";
url = "https://github.com/Genymobile/gnirehtet/commit/2f695503dd80519ce73a80c5aa360b08a97c029d.patch";
hash = "sha256-YVd1B2PVLRGpJNkKb7gpUQWmccfvYaeAmayOmWg8D+Y=";
stripLen = 1;
})
# https://github.com/Genymobile/gnirehtet/pull/478
(fetchpatch {
name = "fix-for-rust-1.64.patch";
url = "https://github.com/Genymobile/gnirehtet/commit/8eeed2084d0d1e2f83056bd11622beaa1fa61281.patch";
hash = "sha256-Wwc+4vG48/qpusGjlE+mSJvvarYq2mQ2CkDkrtKHAwo=";
stripLen = 1;
})
];
cargoHash = "sha256-3iYOeHIQHwxmh8b8vKUf5fQS2fXP2g3orLquvLXzZwE=";
nativeBuildInputs = [ makeWrapper ];

View File

@@ -36265,6 +36265,8 @@ with pkgs;
root = callPackage ../applications/science/misc/root {
python = python3;
inherit (darwin.apple_sdk.frameworks) Cocoa CoreSymbolication OpenGL;
# https://github.com/NixOS/nixpkgs/issues/201254
stdenv = if stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU then gcc11Stdenv else stdenv;
};
root5 = lowPrio (callPackage ../applications/science/misc/root/5.nix {

View File

@@ -4994,6 +4994,8 @@ self: super: with self; {
keystone-engine = callPackage ../development/python-modules/keystone-engine { };
keyrings-passwordstore = callPackage ../development/python-modules/keyrings-passwordstore { };
keystoneauth1 = callPackage ../development/python-modules/keystoneauth1 { };
keyutils = callPackage ../development/python-modules/keyutils {