diff --git a/doc/build-helpers/trivial-build-helpers.chapter.md b/doc/build-helpers/trivial-build-helpers.chapter.md index 13b1835ee505..9e818be674b4 100644 --- a/doc/build-helpers/trivial-build-helpers.chapter.md +++ b/doc/build-helpers/trivial-build-helpers.chapter.md @@ -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. diff --git a/doc/redirects.json b/doc/redirects.json index dd0e844fbbee..3f16f647426e 100644 --- a/doc/redirects.json +++ b/doc/redirects.json @@ -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" diff --git a/lib/default.nix b/lib/default.nix index aff1df150f13..3fda156b75a9 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -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) diff --git a/lib/options.nix b/lib/options.nix index f4d0d9d36cfc..4f75da5ad51a 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -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. diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index 5deb33eeb99f..557fea5e3a4d 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -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..inhibitsSleep`](#opt-services.restic.backups._name_.inhibitsSleep). diff --git a/nixos/lib/make-options-doc/default.nix b/nixos/lib/make-options-doc/default.nix index 210fbd1a0e99..f19847e706d5 100644 --- a/nixos/lib/make-options-doc/default.nix +++ b/nixos/lib/make-options-doc/default.nix @@ -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"; } diff --git a/nixos/modules/programs/screen.nix b/nixos/modules/programs/screen.nix index 63bfe6576cc0..7c92500f5a1f 100644 --- a/nixos/modules/programs/screen.nix +++ b/nixos/modules/programs/screen.nix @@ -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; diff --git a/nixos/modules/services/desktops/pipewire/pipewire.nix b/nixos/modules/services/desktops/pipewire/pipewire.nix index 9431a09b9936..50d9d71d14ce 100644 --- a/nixos/modules/services/desktops/pipewire/pipewire.nix +++ b/nixos/modules/services/desktops/pipewire/pipewire.nix @@ -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."; } ]; diff --git a/nixos/modules/services/games/archisteamfarm.nix b/nixos/modules/services/games/archisteamfarm.nix index 630329175968..77a64a4b426d 100644 --- a/nixos/modules/services/games/archisteamfarm.nix +++ b/nixos/modules/services/games/archisteamfarm.nix @@ -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; diff --git a/nixos/modules/services/home-automation/zigbee2mqtt.nix b/nixos/modules/services/home-automation/zigbee2mqtt.nix index a3d5c868fb38..b8be0acfda56 100644 --- a/nixos/modules/services/home-automation/zigbee2mqtt.nix +++ b/nixos/modules/services/home-automation/zigbee2mqtt.nix @@ -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 = { diff --git a/nixos/modules/services/web-servers/garage.nix b/nixos/modules/services/web-servers/garage.nix index 05c92b1a387b..bfc3fed4a2a5 100644 --- a/nixos/modules/services/web-servers/garage.nix +++ b/nixos/modules/services/web-servers/garage.nix @@ -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; }; diff --git a/pkgs/applications/virtualization/singularity/generic.nix b/pkgs/applications/virtualization/singularity/generic.nix index 24e1b3b67b26..12a9039cb016 100644 --- a/pkgs/applications/virtualization/singularity/generic.nix +++ b/pkgs/applications/virtualization/singularity/generic.nix @@ -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); diff --git a/pkgs/build-support/trivial-builders/default.nix b/pkgs/build-support/trivial-builders/default.nix index c5b27e85e5bb..12a40a2d9602 100644 --- a/pkgs/build-support/trivial-builders/default.nix +++ b/pkgs/build-support/trivial-builders/default.nix @@ -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 diff --git a/pkgs/by-name/la/lammps/package.nix b/pkgs/by-name/la/lammps/package.nix index 496ea81b0b48..28e98e37dc38 100644 --- a/pkgs/by-name/la/lammps/package.nix +++ b/pkgs/by-name/la/lammps/package.nix @@ -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; diff --git a/pkgs/by-name/re/redocly/package.nix b/pkgs/by-name/re/redocly/package.nix index 7eb4b8d0631a..d1986ae940ae 100644 --- a/pkgs/by-name/re/redocly/package.nix +++ b/pkgs/by-name/re/redocly/package.nix @@ -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 = { diff --git a/pkgs/development/libraries/qt-6/default.nix b/pkgs/development/libraries/qt-6/default.nix index 0fcae043a793..96a498c5f195 100644 --- a/pkgs/development/libraries/qt-6/default.nix +++ b/pkgs/development/libraries/qt-6/default.nix @@ -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' { diff --git a/pkgs/pkgs-lib/formats/hocon/default.nix b/pkgs/pkgs-lib/formats/hocon/default.nix index 3be57061bb53..696e600740fa 100644 --- a/pkgs/pkgs-lib/formats/hocon/default.nix +++ b/pkgs/pkgs-lib/formats/hocon/default.nix @@ -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; diff --git a/pkgs/pkgs-lib/formats/hocon/test/backwards-compatibility/default.nix b/pkgs/pkgs-lib/formats/hocon/test/backwards-compatibility/default.nix deleted file mode 100644 index 8b9196b16428..000000000000 --- a/pkgs/pkgs-lib/formats/hocon/test/backwards-compatibility/default.nix +++ /dev/null @@ -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 - ''; - } diff --git a/pkgs/pkgs-lib/formats/hocon/test/backwards-compatibility/expected.txt b/pkgs/pkgs-lib/formats/hocon/test/backwards-compatibility/expected.txt deleted file mode 100644 index 2835a3c6ca39..000000000000 --- a/pkgs/pkgs-lib/formats/hocon/test/backwards-compatibility/expected.txt +++ /dev/null @@ -1,22 +0,0 @@ -{ - "literal" = [ - 1, - "a", - ] - "nested" = { - "literal" = [ - 1, - "a", - ] - "substitution" = ${?PATH} - } - "nested_in_array" = [ - ${?PATH}, - [ - 1, - "a", - ] - ] - "substitution" = ${?PATH} -} - diff --git a/pkgs/pkgs-lib/formats/hocon/test/default.nix b/pkgs/pkgs-lib/formats/hocon/test/default.nix index 19928703b95e..6cd03fe4854f 100644 --- a/pkgs/pkgs-lib/formats/hocon/test/default.nix +++ b/pkgs/pkgs-lib/formats/hocon/test/default.nix @@ -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 { }; } diff --git a/pkgs/top-level/qt5-packages.nix b/pkgs/top-level/qt5-packages.nix index c1ac5b0f52ee..028b1196fc96 100644 --- a/pkgs/top-level/qt5-packages.nix +++ b/pkgs/top-level/qt5-packages.nix @@ -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\"."; -})); +}))); } diff --git a/pkgs/top-level/qt6-packages.nix b/pkgs/top-level/qt6-packages.nix index 6bd557864b0e..366fa799fa0e 100644 --- a/pkgs/top-level/qt6-packages.nix +++ b/pkgs/top-level/qt6-packages.nix @@ -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\"."; }); }