minimal-bootstrap.bzip2: build with musl

+10 -23
+7 -22
pkgs/os-specific/linux/minimal-bootstrap/bzip2/default.nix
··· 3 3 , bash 4 4 , tinycc 5 5 , gnumake 6 - , gnupatch 6 + , gnutar 7 7 , gzip 8 8 }: 9 9 let ··· 14 14 url = "https://sourceware.org/pub/bzip2/bzip2-${version}.tar.gz"; 15 15 sha256 = "0s92986cv0p692icqlw1j42y9nld8zd83qwhzbqd61p1dqbh6nmb"; 16 16 }; 17 - 18 - patches = [ 19 - # mes libc has no time support, so we remove that. 20 - # It also does not have fch{own,mod}, which we don't care about in the bootstrap 21 - # anyway, so we can null-op those calls. 22 - (fetchurl { 23 - url = "https://github.com/fosslinux/live-bootstrap/raw/87e9d7db9d22b400d1c05247254ac39ee2577e80/sysa/bzip2-1.0.8/patches/mes-libc.patch"; 24 - sha256 = "14dciwib28h413skzfkh7samzh8x87dmwhldyxxphff04pvl1j3c"; 25 - }) 26 - ]; 27 17 in 28 18 bash.runCommand "${pname}-${version}" { 29 19 inherit pname version; ··· 31 21 nativeBuildInputs = [ 32 22 tinycc.compiler 33 23 gnumake 34 - gnupatch 24 + gnutar 35 25 gzip 36 26 ]; 37 27 38 28 passthru.tests.get-version = result: 39 29 bash.runCommand "${pname}-get-version-${version}" {} '' 40 - ${result}/bin/bzip2 --version --help 30 + ${result}/bin/bzip2 --help 41 31 mkdir $out 42 32 ''; 43 33 ··· 50 40 }; 51 41 } '' 52 42 # Unpack 53 - cp ${src} bzip2.tar.gz 54 - gunzip bzip2.tar.gz 55 - untar --file bzip2.tar 56 - rm bzip2.tar 43 + tar xzf ${src} 57 44 cd bzip2-${version} 58 45 59 - # Patch 60 - ${lib.concatMapStringsSep "\n" (f: "patch -Np0 -i ${f}") patches} 61 - 62 46 # Build 63 47 make \ 64 - CC="tcc -B ${tinycc.libs}/lib -I ." \ 48 + -j $NIX_BUILD_CORES \ 49 + CC="tcc -B ${tinycc.libs}/lib" \ 65 50 AR="tcc -ar" \ 66 51 bzip2 bzip2recover 67 52 68 53 # Install 69 - make install PREFIX=$out 54 + make install -j $NIX_BUILD_CORES PREFIX=$out 70 55 ''
+3 -1
pkgs/os-specific/linux/minimal-bootstrap/default.nix
··· 32 32 33 33 bzip2 = callPackage ./bzip2 { 34 34 bash = bash_2_05; 35 - tinycc = tinycc-mes; 35 + tinycc = tinycc-musl; 36 + gnumake = gnumake-musl; 37 + gnutar = gnutar-musl; 36 38 }; 37 39 38 40 coreutils = callPackage ./coreutils { tinycc = tinycc-mes; };