From 137dd249c5f1748ded9332194e0c0d470786ad3e Mon Sep 17 00:00:00 2001 From: figsoda Date: Wed, 31 May 2023 09:23:09 -0400 Subject: [PATCH] writeTextFile: revert workaround for `executable = null` --- nixos/doc/manual/release-notes/rl-2311.section.md | 2 ++ pkgs/build-support/trivial-builders/default.nix | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md index ef4465d9ddfd..4cd088dd115e 100644 --- a/nixos/doc/manual/release-notes/rl-2311.section.md +++ b/nixos/doc/manual/release-notes/rl-2311.section.md @@ -14,6 +14,8 @@ ## Backward Incompatibilities {#sec-release-23.11-incompatibilities} +- `writeTextFile` now requires `executable` to be boolean, values like `null` or `""` will now fail to evaluate. + - The latest version of `clonehero` now stores custom content in `~/.clonehero`. See the [migration instructions](https://clonehero.net/2022/11/29/v23-to-v1-migration-instructions.html). Typically, these content files would exist along side the binary, but the previous build used a wrapper script that would store them in `~/.config/unity3d/srylain Inc_/Clone Hero`. - `etcd` has been updated to 3.5, you will want to read the [3.3 to 3.4](https://etcd.io/docs/v3.5/upgrades/upgrade_3_4/) and [3.4 to 3.5](https://etcd.io/docs/v3.5/upgrades/upgrade_3_5/) upgrade guides diff --git a/pkgs/build-support/trivial-builders/default.nix b/pkgs/build-support/trivial-builders/default.nix index 7152f9a1be41..d3cb22a1f535 100644 --- a/pkgs/build-support/trivial-builders/default.nix +++ b/pkgs/build-support/trivial-builders/default.nix @@ -141,7 +141,7 @@ rec { runCommand name { inherit text executable checkPhase allowSubstitutes preferLocalBuild; passAsFile = [ "text" ]; - meta = lib.optionalAttrs (toString executable != "" && matches != null) { + meta = lib.optionalAttrs (executable && matches != null) { mainProgram = lib.head matches; } // meta; }