treewide: remove deprecations up until 24.11 (#356732)
This commit is contained in:
commit
49d9ef16b1
@ -754,10 +754,6 @@ This creates a derivation with a directory structure like the following:
|
||||
...
|
||||
```
|
||||
|
||||
## `writeReferencesToFile` {#trivial-builder-writeReferencesToFile}
|
||||
|
||||
Deprecated. Use [`writeClosure`](#trivial-builder-writeClosure) instead.
|
||||
|
||||
## `writeClosure` {#trivial-builder-writeClosure}
|
||||
|
||||
Given a list of [store paths](https://nixos.org/manual/nix/stable/glossary#gloss-store-path) (or string-like expressions coercible to store paths), write their collective [closure](https://nixos.org/manual/nix/stable/glossary#gloss-closure) to a text file.
|
||||
|
@ -1421,11 +1421,9 @@
|
||||
"trivial-builder-symlinkJoin": [
|
||||
"index.html#trivial-builder-symlinkJoin"
|
||||
],
|
||||
"trivial-builder-writeReferencesToFile": [
|
||||
"index.html#trivial-builder-writeReferencesToFile"
|
||||
],
|
||||
"trivial-builder-writeClosure": [
|
||||
"index.html#trivial-builder-writeClosure"
|
||||
"index.html#trivial-builder-writeClosure",
|
||||
"index.html#trivial-builder-writeReferencesToFile"
|
||||
],
|
||||
"trivial-builder-writeDirectReferencesToFile": [
|
||||
"index.html#trivial-builder-writeDirectReferencesToFile"
|
||||
|
@ -152,7 +152,7 @@ let
|
||||
scrubOptionValue literalExpression literalExample
|
||||
showOption showOptionWithDefLocs showFiles
|
||||
unknownModule mkOption mkPackageOption mkPackageOptionMD
|
||||
mdDoc literalMD;
|
||||
literalMD;
|
||||
inherit (self.types) isType setType defaultTypeMerge defaultFunctor
|
||||
isOptionType mkOptionType;
|
||||
inherit (self.asserts)
|
||||
|
@ -399,13 +399,6 @@ rec {
|
||||
|
||||
literalExample = lib.warn "lib.literalExample is deprecated, use lib.literalExpression instead, or use lib.literalMD for a non-Nix description." literalExpression;
|
||||
|
||||
/* Transition marker for documentation that's already migrated to markdown
|
||||
syntax. Has been a no-op for some while and been removed from nixpkgs.
|
||||
Kept here to alert downstream users who may not be aware of the migration's
|
||||
completion that it should be removed from modules.
|
||||
*/
|
||||
mdDoc = lib.warn "lib.mdDoc will be removed from nixpkgs in 24.11. Option descriptions are now in Markdown by default; you can remove any remaining uses of lib.mdDoc.";
|
||||
|
||||
/* For use in the `defaultText` and `example` option attributes. Causes the
|
||||
given MD text to be inserted verbatim in the documentation, for when
|
||||
a `literalExpression` would be too hard to read.
|
||||
|
@ -869,6 +869,8 @@
|
||||
|
||||
- The `shadowstack` hardening flag has been added, though disabled by default.
|
||||
|
||||
- `writeReferencesToFile` has been removed after its deprecation in 24.05. Use the trivial build helper `writeClosure` instead.
|
||||
|
||||
- `xxd` is now provided by the `tinyxxd` package rather than `vim.xxd` to reduce closure size and vulnerability impact. Since it has the same options and semantics as Vim's `xxd` utility, there is no user impact. Vim's `xxd` remains available as the `vim.xxd` package.
|
||||
|
||||
- `restic` module now has an option for inhibiting system sleep while backups are running, defaulting to off (not inhibiting sleep). Available as [`services.restic.backups.<name>.inhibitsSleep`](#opt-services.restic.backups._name_.inhibitsSleep).
|
||||
|
@ -39,10 +39,6 @@
|
||||
}
|
||||
```
|
||||
|
||||
## optionsDocBook
|
||||
|
||||
deprecated since 23.11 and will be removed in 24.05.
|
||||
|
||||
## optionsAsciiDoc
|
||||
|
||||
Documentation rendered as AsciiDoc. This is useful for e.g. man pages.
|
||||
@ -111,18 +107,8 @@
|
||||
# instead of printing warnings for eg options with missing descriptions (which may be lost
|
||||
# by nix build unless -L is given), emit errors instead and fail the build
|
||||
, warningsAreErrors ? true
|
||||
# allow docbook option docs if `true`. only markdown documentation is allowed when set to
|
||||
# `false`, and a different renderer may be used with different bugs and performance
|
||||
# characteristics but (hopefully) indistinguishable output.
|
||||
# deprecated since 23.11.
|
||||
# TODO remove in a while.
|
||||
, allowDocBook ? false
|
||||
# TODO remove in a while (see https://github.com/NixOS/nixpkgs/issues/300735)
|
||||
, markdownByDefault ? true
|
||||
}:
|
||||
|
||||
assert markdownByDefault && ! allowDocBook;
|
||||
|
||||
let
|
||||
rawOpts = lib.optionAttrSetToDocList options;
|
||||
transformedOpts = map transformOptions rawOpts;
|
||||
@ -229,6 +215,4 @@ in rec {
|
||||
echo "file json $dst/options.json" >> $out/nix-support/hydra-build-products
|
||||
echo "file json-br $dst/options.json.br" >> $out/nix-support/hydra-build-products
|
||||
'';
|
||||
|
||||
optionsDocBook = throw "optionsDocBook has been removed in 24.05";
|
||||
}
|
||||
|
@ -24,15 +24,6 @@ in
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
{
|
||||
# TODO: Added in 24.05, remove before 24.11
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.screenrc != "" -> cfg.enable;
|
||||
message = "`programs.screen.screenrc` has been configured, but `programs.screen.enable` is not true";
|
||||
}
|
||||
];
|
||||
}
|
||||
(lib.mkIf cfg.enable {
|
||||
environment.etc.screenrc = {
|
||||
text = cfg.screenrc;
|
||||
|
@ -344,7 +344,7 @@ in {
|
||||
)
|
||||
config.environment.etc
|
||||
)) == 1;
|
||||
message = "Using `environment.etc.\"pipewire<...>\"` directly is no longer supported in 24.05. Use `services.pipewire.extraConfig` or `services.pipewire.configPackages` instead.";
|
||||
message = "Using `environment.etc.\"pipewire<...>\"` directly is no longer supported. Use `services.pipewire.extraConfig` or `services.pipewire.configPackages` instead.";
|
||||
}
|
||||
];
|
||||
|
||||
|
@ -164,9 +164,6 @@ in
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# TODO: drop with 24.11
|
||||
services.archisteamfarm.dataDir = lib.mkIf (lib.versionAtLeast config.system.stateVersion "24.05") (lib.mkDefault "/var/lib/asf");
|
||||
|
||||
users = {
|
||||
users.archisteamfarm = {
|
||||
home = cfg.dataDir;
|
||||
|
@ -10,8 +10,7 @@ in
|
||||
meta.maintainers = with lib.maintainers; [ sweber hexa ];
|
||||
|
||||
imports = [
|
||||
# Remove warning before the 21.11 release
|
||||
(lib.mkRenamedOptionModule [ "services" "zigbee2mqtt" "config" ] [ "services" "zigbee2mqtt" "settings" ])
|
||||
(lib.mkRemovedOptionModule [ "services" "zigbee2mqtt" "config" ] "The option services.zigbee2mqtt.config was renamed to services.zigbee2mqtt.settings.")
|
||||
];
|
||||
|
||||
options.services.zigbee2mqtt = {
|
||||
|
@ -93,46 +93,6 @@ in
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
assertions = [
|
||||
# We removed our module-level default for replication_mode. If a user upgraded
|
||||
# to garage 1.0.0 while relying on the module-level default, they would be left
|
||||
# with a config which evaluates and builds, but then garage refuses to start
|
||||
# because either replication_factor or replication_mode is required.
|
||||
# The replication_factor option also was `toString`'ed before, which is
|
||||
# now not possible anymore, so we prompt the user to change it to a string
|
||||
# if present.
|
||||
# These assertions can be removed in NixOS 24.11, when all users have been
|
||||
# warned once.
|
||||
{
|
||||
assertion =
|
||||
(cfg.settings ? replication_factor || cfg.settings ? replication_mode)
|
||||
|| lib.versionOlder cfg.package.version "1.0.0";
|
||||
message = ''
|
||||
Garage 1.0.0 requires an explicit replication factor to be set.
|
||||
Please set replication_factor to 1 explicitly to preserve the previous behavior.
|
||||
https://git.deuxfleurs.fr/Deuxfleurs/garage/src/tag/v1.0.0/doc/book/reference-manual/configuration.md#replication_factor
|
||||
|
||||
'';
|
||||
}
|
||||
{
|
||||
assertion = lib.isString (cfg.settings.replication_mode or "");
|
||||
message = ''
|
||||
The explicit `replication_mode` option in `services.garage.settings`
|
||||
has been removed and is now handled by the freeform settings in order
|
||||
to allow it being completely absent (for Garage 1.x).
|
||||
That module option previously `toString`'ed the value it's configured
|
||||
with, which is now no longer possible.
|
||||
|
||||
You're still using a non-string here, please manually set it to
|
||||
a string, or migrate to the separate setting keys introduced in 1.x.
|
||||
|
||||
Refer to https://garagehq.deuxfleurs.fr/documentation/working-documents/migration-1/
|
||||
for the migration guide.
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
environment.etc."garage.toml" = {
|
||||
source = configFile;
|
||||
};
|
||||
|
@ -76,14 +76,6 @@ in
|
||||
# inside the upstream source code.
|
||||
# Include "/run/wrappers/bin" by default for the convenience of NixOS users.
|
||||
systemBinPaths ? [ "/run/wrappers/bin" ],
|
||||
# Path to SUID-ed newuidmap executable
|
||||
# Deprecated in favour of systemBinPaths
|
||||
# TODO(@ShamrockLee): Remove after Nixpkgs 24.05 branch-off
|
||||
newuidmapPath ? null,
|
||||
# Path to SUID-ed newgidmap executable
|
||||
# Deprecated in favour of systemBinPaths
|
||||
# TODO(@ShamrockLee): Remove after Nixpkgs 24.05 branch-off
|
||||
newgidmapPath ? null,
|
||||
# External LOCALSTATEDIR
|
||||
externalLocalStateDir ? null,
|
||||
# Remove the symlinks to `singularity*` when projectName != "singularity"
|
||||
@ -110,28 +102,6 @@ in
|
||||
}@args:
|
||||
|
||||
let
|
||||
# Backward compatibility for privileged-un-utils.
|
||||
# TODO(@ShamrockLee): Remove after Nixpkgs 24.05 branch-off.
|
||||
privileged-un-utils =
|
||||
if ((newuidmapPath == null) && (newgidmapPath == null)) then
|
||||
null
|
||||
else
|
||||
lib.warn
|
||||
"${pname}: arguments newuidmapPath and newgidmapPath is deprecated in favour of systemBinPaths."
|
||||
(
|
||||
runCommandLocal "privileged-un-utils" { } ''
|
||||
mkdir -p "$out/bin"
|
||||
ln -s ${lib.escapeShellArg newuidmapPath} "$out/bin/newuidmap"
|
||||
ln -s ${lib.escapeShellArg newgidmapPath} "$out/bin/newgidmap"
|
||||
''
|
||||
);
|
||||
|
||||
# Backward compatibility for privileged-un-utils.
|
||||
# TODO(@ShamrockLee): Remove after Nixpkgs 24.05 branch-off.
|
||||
systemBinPaths =
|
||||
lib.optional (privileged-un-utils != null) (lib.makeBinPath [ privileged-un-utils ])
|
||||
++ args.systemBinPaths or [ "/run/wrappers/bin" ];
|
||||
|
||||
concatMapStringAttrsSep =
|
||||
sep: f: attrs:
|
||||
lib.concatMapStringsSep sep (name: f name attrs.${name}) (lib.attrNames attrs);
|
||||
|
@ -607,7 +607,6 @@ rec {
|
||||
# See https://nixos.org/manual/nixpkgs/unstable/#sec-pkgs.makeSetupHook
|
||||
makeSetupHook =
|
||||
{ name ? lib.warn "calling makeSetupHook without passing a name is deprecated." "hook"
|
||||
, deps ? [ ]
|
||||
# hooks go in nativeBuildInputs so these will be nativeBuildInputs
|
||||
, propagatedBuildInputs ? [ ]
|
||||
# these will be buildInputs
|
||||
@ -625,11 +624,7 @@ rec {
|
||||
__structuredAttrs = false;
|
||||
inherit meta;
|
||||
inherit depsTargetTargetPropagated;
|
||||
propagatedBuildInputs =
|
||||
# remove list conditionals before 23.11
|
||||
lib.warnIf (!lib.isList deps) "'deps' argument to makeSetupHook must be a list. content of deps: ${toString deps}"
|
||||
(lib.warnIf (deps != [ ]) "'deps' argument to makeSetupHook is deprecated and will be removed in release 23.11., Please use propagatedBuildInputs instead. content of deps: ${toString deps}"
|
||||
propagatedBuildInputs ++ (if lib.isList deps then deps else [ deps ]));
|
||||
inherit propagatedBuildInputs;
|
||||
strictDeps = true;
|
||||
# TODO 2023-01, no backport: simplify to inherit passthru;
|
||||
passthru = passthru
|
||||
@ -645,13 +640,8 @@ rec {
|
||||
substituteAll ${script} $out/nix-support/setup-hook
|
||||
'');
|
||||
|
||||
|
||||
# Docs in doc/build-helpers/trivial-build-helpers.chapter.md
|
||||
# See https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-writeReferencesToFile
|
||||
# TODO: Convert to throw after Nixpkgs 24.05 branch-off.
|
||||
writeReferencesToFile = (if config.allowAliases then lib.warn else throw)
|
||||
"writeReferencesToFile is deprecated in favour of writeClosure"
|
||||
(path: writeClosure [ path ]);
|
||||
# Remove after 25.05 branch-off
|
||||
writeReferencesToFile = throw "writeReferencesToFile has been removed. Use writeClosure instead.";
|
||||
|
||||
# Docs in doc/build-helpers/trivial-build-helpers.chapter.md
|
||||
# See https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-writeClosure
|
||||
|
@ -70,9 +70,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
];
|
||||
|
||||
passthru = {
|
||||
# Remove these at some point - perhaps after release 23.11. See discussion at:
|
||||
# https://github.com/NixOS/nixpkgs/pull/238771#discussion_r1235459961
|
||||
mpi = throw "`lammps-mpi.passthru.mpi` was removed in favor of `extraBuildInputs`";
|
||||
inherit packages;
|
||||
inherit extraCmakeFlags;
|
||||
inherit extraBuildInputs;
|
||||
|
@ -37,9 +37,6 @@ buildNpmPackage rec {
|
||||
$out/bin/redocly \
|
||||
--set-default REDOCLY_TELEMETRY off \
|
||||
--set-default REDOCLY_SUPPRESS_UPDATE_NOTICE true
|
||||
|
||||
# Symlink for backwards compatibility. Remove after 24.05.
|
||||
ln -s $out/bin/redocly $out/bin/redocly-cli
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
|
@ -208,9 +208,6 @@ let
|
||||
};
|
||||
} ./hooks/qmake-hook.sh)
|
||||
{ };
|
||||
} // lib.optionalAttrs config.allowAliases {
|
||||
# Remove completely before 24.11
|
||||
overrideScope' = builtins.throw "qt6 now uses makeScopeWithSplicing which does not have \"overrideScope'\", use \"overrideScope\".";
|
||||
};
|
||||
|
||||
baseScope = makeScopeWithSplicing' {
|
||||
|
@ -101,43 +101,6 @@ in
|
||||
lib = hoconLib;
|
||||
|
||||
generate = name: value:
|
||||
let
|
||||
# TODO: remove in 24.11
|
||||
# Backwards compatibility for generators in the following locations:
|
||||
# - nixos/modules/services/networking/jibri/default.nix (__hocon_envvar)
|
||||
# - nixos/modules/services/networking/jicofo.nix (__hocon_envvar, __hocon_unquoted_string)
|
||||
# - nixos/modules/services/networking/jitsi-videobridge.nix (__hocon_envvar)
|
||||
replaceOldIndicators = value:
|
||||
if lib.isAttrs value then
|
||||
(if value ? "__hocon_envvar"
|
||||
then
|
||||
lib.warn ''
|
||||
Use of `__hocon_envvar` has been deprecated, and will
|
||||
be removed in the future.
|
||||
|
||||
Please use `(pkgs.formats.hocon {}).lib.mkSubstitution` instead.
|
||||
''
|
||||
(hoconLib.mkSubstitution value.__hocon_envvar)
|
||||
else if value ? "__hocon_unquoted_string"
|
||||
then
|
||||
lib.warn ''
|
||||
Use of `__hocon_unquoted_string` has been deprecated, and will
|
||||
be removed in the future.
|
||||
|
||||
Please make use of the freeform options of
|
||||
`(pkgs.formats.hocon {}).format` instead.
|
||||
''
|
||||
{
|
||||
value = value.__hocon_unquoted_string;
|
||||
_type = "unquoted_string";
|
||||
}
|
||||
else lib.mapAttrs (_: replaceOldIndicators) value)
|
||||
else if lib.isList value
|
||||
then map replaceOldIndicators value
|
||||
else value;
|
||||
|
||||
finalValue = replaceOldIndicators value;
|
||||
in
|
||||
callPackage
|
||||
({
|
||||
stdenvNoCC
|
||||
@ -151,7 +114,7 @@ in
|
||||
dontUnpack = true;
|
||||
preferLocalBuild = true;
|
||||
|
||||
json = builtins.toJSON finalValue;
|
||||
json = builtins.toJSON value;
|
||||
passAsFile = [ "json" ];
|
||||
|
||||
strictDeps = true;
|
||||
|
@ -1,65 +0,0 @@
|
||||
{ formats, stdenvNoCC, ... }:
|
||||
let
|
||||
hocon = formats.hocon { };
|
||||
|
||||
expression = {
|
||||
substitution = { __hocon_envvar = "PATH"; };
|
||||
literal = {
|
||||
__hocon_unquoted_string = ''
|
||||
[
|
||||
1,
|
||||
"a",
|
||||
]'';
|
||||
};
|
||||
|
||||
nested = {
|
||||
substitution = { __hocon_envvar = "PATH"; };
|
||||
literal = {
|
||||
__hocon_unquoted_string = ''
|
||||
[
|
||||
1,
|
||||
"a",
|
||||
]'';
|
||||
};
|
||||
};
|
||||
|
||||
nested_in_array = [
|
||||
{ __hocon_envvar = "PATH"; }
|
||||
{
|
||||
__hocon_unquoted_string = ''
|
||||
[
|
||||
1,
|
||||
"a",
|
||||
]'';
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
hocon-test-conf = hocon.generate "hocon-test.conf" expression;
|
||||
in
|
||||
stdenvNoCC.mkDerivation {
|
||||
name = "pkgs.formats.hocon-test-backwards-compatibility";
|
||||
|
||||
dontUnpack = true;
|
||||
dontBuild = true;
|
||||
|
||||
doCheck = true;
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
diff -U3 ${./expected.txt} ${hocon-test-conf}
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir $out
|
||||
cp ${./expected.txt} $out/expected.txt
|
||||
cp ${hocon-test-conf} $out/hocon-test.conf
|
||||
cp ${hocon-test-conf.passthru.json} $out/hocon-test.json
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
{
|
||||
"literal" = [
|
||||
1,
|
||||
"a",
|
||||
]
|
||||
"nested" = {
|
||||
"literal" = [
|
||||
1,
|
||||
"a",
|
||||
]
|
||||
"substitution" = ${?PATH}
|
||||
}
|
||||
"nested_in_array" = [
|
||||
${?PATH},
|
||||
[
|
||||
1,
|
||||
"a",
|
||||
]
|
||||
]
|
||||
"substitution" = ${?PATH}
|
||||
}
|
||||
|
@ -1,15 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
comprehensive = pkgs.callPackage ./comprehensive { };
|
||||
backwards-compatibility =
|
||||
let
|
||||
pkgsNoWarn = pkgs.extend (final: prev: {
|
||||
lib = prev.lib.extend (libFinal: libPrev: {
|
||||
warn = msg: v: v;
|
||||
trivial = libPrev.trivial // {
|
||||
warn = msg: v: v;
|
||||
};
|
||||
});
|
||||
});
|
||||
in pkgsNoWarn.callPackage ./backwards-compatibility { };
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ makeScopeWithSplicing' {
|
||||
};
|
||||
in (lib.makeOverridable mkMaui attrs);
|
||||
|
||||
noExtraAttrs = set: lib.attrsets.removeAttrs set [ "extend" "override" "overrideScope" "overrideScope'" "overrideDerivation" ];
|
||||
noExtraAttrs = set: lib.attrsets.removeAttrs set [ "extend" "override" "overrideScope" "overrideDerivation" ];
|
||||
|
||||
in (noExtraAttrs (kdeFrameworks // plasmaMobileGear // plasma5 // plasma5.thirdParty // kdeGear // mauiPackages // qt5 // {
|
||||
|
||||
@ -292,8 +292,5 @@ in (noExtraAttrs (kdeFrameworks // plasmaMobileGear // plasma5 // plasma5.thirdP
|
||||
xwaylandvideobridge = callPackage ../tools/wayland/xwaylandvideobridge { };
|
||||
|
||||
yuview = callPackage ../applications/video/yuview { };
|
||||
}) // lib.optionalAttrs pkgs.config.allowAliases {
|
||||
# Remove completely before 24.11
|
||||
overrideScope' = builtins.throw "libsForQt5 now uses makeScopeWithSplicing which does not have \"overrideScope'\", use \"overrideScope\".";
|
||||
}));
|
||||
})));
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ makeScopeWithSplicing' {
|
||||
otherSplices = generateSplicesForMkScope "qt6Packages";
|
||||
f = (self: let
|
||||
inherit (self) callPackage;
|
||||
noExtraAttrs = set: lib.attrsets.removeAttrs set [ "extend" "override" "overrideScope" "overrideScope'" "overrideDerivation" ];
|
||||
noExtraAttrs = set: lib.attrsets.removeAttrs set [ "extend" "override" "overrideScope" "overrideDerivation" ];
|
||||
in (noExtraAttrs qt6) // {
|
||||
inherit stdenv;
|
||||
|
||||
@ -117,8 +117,5 @@ makeScopeWithSplicing' {
|
||||
wayqt = callPackage ../development/libraries/wayqt { };
|
||||
|
||||
xwaylandvideobridge = kdePackages.callPackage ../tools/wayland/xwaylandvideobridge { };
|
||||
} // lib.optionalAttrs pkgs.config.allowAliases {
|
||||
# Remove completely before 24.11
|
||||
overrideScope' = builtins.throw "qt6Packages now uses makeScopeWithSplicing which does not have \"overrideScope'\", use \"overrideScope\".";
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user