tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
minimal-bootstrap.musl: enable gcc wrapper
Emily Trau
2 years ago
12fe603c
4deff14b
+7
-3
1 changed file
expand all
collapse all
unified
split
pkgs
os-specific
linux
minimal-bootstrap
musl
default.nix
+7
-3
pkgs/os-specific/linux/minimal-bootstrap/musl/default.nix
···
35
36
passthru.tests.hello-world = result:
37
bash.runCommand "${pname}-simple-program-${version}" {
38
-
nativeBuildInputs = [ gcc binutils ];
39
} ''
40
cat <<EOF >> test.c
41
#include <stdio.h>
···
44
return 0;
45
}
46
EOF
47
-
gcc -static -B${result}/lib -I${result}/include -o test test.c
48
./test
49
mkdir $out
50
'';
···
67
bash ./configure \
68
--prefix=$out \
69
--build=${buildPlatform.config} \
70
-
--host=${hostPlatform.config}
0
0
71
72
# Build
73
make -j $NIX_BUILD_CORES
74
75
# Install
76
make -j $NIX_BUILD_CORES install
0
0
77
''
···
35
36
passthru.tests.hello-world = result:
37
bash.runCommand "${pname}-simple-program-${version}" {
38
+
nativeBuildInputs = [ gcc binutils result ];
39
} ''
40
cat <<EOF >> test.c
41
#include <stdio.h>
···
44
return 0;
45
}
46
EOF
47
+
musl-gcc -o test test.c
48
./test
49
mkdir $out
50
'';
···
67
bash ./configure \
68
--prefix=$out \
69
--build=${buildPlatform.config} \
70
+
--host=${hostPlatform.config} \
71
+
--syslibdir=$out/lib \
72
+
--enable-wrapper
73
74
# Build
75
make -j $NIX_BUILD_CORES
76
77
# Install
78
make -j $NIX_BUILD_CORES install
79
+
sed -i 's|/bin/sh|${bash}/bin/bash|' $out/bin/*
80
+
ln -s ../lib/libc.so $out/bin/ldd
81
''