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: 11472f0d1b ("busybox-sandbox-shell: replace pkgsStatic with useMusl")
This commit is contained in:
@@ -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;
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user