40 lines
960 B
Nix
40 lines
960 B
Nix
{ stdenv, fetchurl, fetchpatch }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "musl-${version}";
|
|
version = "1.1.17";
|
|
|
|
src = fetchurl {
|
|
url = "http://www.musl-libc.org/releases/${name}.tar.gz";
|
|
sha256 = "0r0lyp2w6v2bvm8h1si7w3p2qx037szl14qnxm5p00568z3m3an8";
|
|
};
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
# Disable auto-adding stack protector flags,
|
|
# so musl can selectively disable as needed
|
|
hardeningDisable = [ "stackprotector" ];
|
|
|
|
preConfigure = ''
|
|
configureFlagsArray+=("--syslibdir=$out/lib")
|
|
'';
|
|
|
|
configureFlags = [
|
|
"--enable-shared"
|
|
"--enable-static"
|
|
"CFLAGS=-fstack-protector-strong"
|
|
];
|
|
|
|
patches = [];
|
|
|
|
dontDisableStatic = true;
|
|
|
|
meta = {
|
|
description = "An efficient, small, quality libc implementation";
|
|
homepage = "http://www.musl-libc.org";
|
|
license = stdenv.lib.licenses.mit;
|
|
platforms = stdenv.lib.platforms.linux;
|
|
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
|
|
};
|
|
}
|