From 8dc96e955c3f42bf5b25879ce98d1f3542f5ccc6 Mon Sep 17 00:00:00 2001 From: Eman Resu Date: Mon, 20 Jul 2026 09:55:17 -0400 Subject: [PATCH] lib.strings.fileContents: partially apply removeSuffix --- lib/strings.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/strings.nix b/lib/strings.nix index 7de142da113a..411e1729d7a7 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -2871,7 +2871,11 @@ rec { ::: */ - fileContents = file: removeSuffix "\n" (readFile file); + fileContents = + let + removeNewlineSuffix = removeSuffix "\n"; + in + file: removeNewlineSuffix (readFile file); /** Creates a valid derivation name from a potentially invalid one.