From 89f4dd9602ba360710e6cc51bac21cab555bdeca Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Tue, 3 Dec 2024 00:56:40 +0100 Subject: [PATCH] busybox-sandbox-shell: fix eval for musl Setting useMusl all the time to a condition dependent on isGnu meant that for musl platforms, useMusl ended up being set to false, tripping the assertion in the busybox expression. The correct thing to do is to leave useMusl at its default value, except for in the specific case where we want to force it to true. Fixes: 11472f0d1b10 ("busybox-sandbox-shell: replace pkgsStatic with useMusl") --- pkgs/os-specific/linux/busybox/sandbox-shell.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/os-specific/linux/busybox/sandbox-shell.nix b/pkgs/os-specific/linux/busybox/sandbox-shell.nix index e7e1e05efa460..38df716997ca9 100644 --- a/pkgs/os-specific/linux/busybox/sandbox-shell.nix +++ b/pkgs/os-specific/linux/busybox/sandbox-shell.nix @@ -1,12 +1,10 @@ { lib, stdenv, busybox, musl }: # Minimal shell for use as basic /bin/sh in sandbox builds -busybox.override { +busybox.override ({ enableStatic = true; enableMinimal = true; - useMusl = stdenv.hostPlatform.isGnu && lib.meta.availableOn stdenv.hostPlatform musl; - extraConfig = '' CONFIG_FEATURE_FANCY_ECHO y CONFIG_FEATURE_SH_MATH y @@ -26,4 +24,6 @@ busybox.override { CONFIG_ASH_PRINTF y CONFIG_ASH_TEST y ''; -} +} // lib.optionalAttrs (stdenv.hostPlatform.isGnu && lib.meta.availableOn stdenv.hostPlatform musl) { + useMusl = true; +})