From 5524dac2fea0651a0b5f5477fb5795e7cb566873 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Mon, 13 May 2019 22:10:39 +0200 Subject: [PATCH] coreutils: Refactor test patching. So that more patches can easily be added and commented. --- pkgs/tools/misc/coreutils/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix index c80bb64d0bb..d9dc1949845 100644 --- a/pkgs/tools/misc/coreutils/default.nix +++ b/pkgs/tools/misc/coreutils/default.nix @@ -54,10 +54,12 @@ stdenv.mkDerivation rec { for f in gnulib-tests/{test-chown.c,test-fchownat.c,test-lchown.c}; do echo "int main() { return 77; }" > "$f" done - '' + optionalString (stdenv.hostPlatform.libc == "musl") '' - echo "int main() { return 77; }" > gnulib-tests/test-parse-datetime.c - echo "int main() { return 77; }" > gnulib-tests/test-getlogin.c - ''; + '' + optionalString (stdenv.hostPlatform.libc == "musl") (lib.concatStringsSep "\n" [ + '' + echo "int main() { return 77; }" > gnulib-tests/test-parse-datetime.c + echo "int main() { return 77; }" > gnulib-tests/test-getlogin.c + '' + ]); outputs = [ "out" "info" ];