From 51da8b6b00c2b18b6a2fac9bc15e6fd67932396b Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 17 Nov 2024 14:34:11 +0100 Subject: [PATCH] writeReferencesToFile: remove Had been deprecated and scheduled for removal in 24.11. --- doc/build-helpers/trivial-build-helpers.chapter.md | 4 ---- doc/redirects.json | 6 ++---- nixos/doc/manual/release-notes/rl-2411.section.md | 2 ++ pkgs/build-support/trivial-builders/default.nix | 9 ++------- 4 files changed, 6 insertions(+), 15 deletions(-) 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/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index e62065775b91..1762a6d075ed 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -860,6 +860,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/pkgs/build-support/trivial-builders/default.nix b/pkgs/build-support/trivial-builders/default.nix index c5b27e85e5bb..107c40c87856 100644 --- a/pkgs/build-support/trivial-builders/default.nix +++ b/pkgs/build-support/trivial-builders/default.nix @@ -645,13 +645,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