minimal-bootstrap.gawk-static: init at 5.3.2
This commit is contained in:
@@ -117,6 +117,7 @@ lib.makeScope
|
||||
# FIXME: not sure why new gawk doesn't work
|
||||
gawk = gawk-mes;
|
||||
};
|
||||
|
||||
gcc46-cxx = callPackage ./gcc/4.6.cxx.nix {
|
||||
gcc = gcc46;
|
||||
gnumake = gnumake-musl;
|
||||
@@ -174,6 +175,7 @@ lib.makeScope
|
||||
tinycc = tinycc-musl;
|
||||
gnused = gnused-mes;
|
||||
};
|
||||
|
||||
gnused-mes = callPackage ./gnused/mes.nix {
|
||||
bash = bash_2_05;
|
||||
tinycc = tinycc-bootstrappable;
|
||||
@@ -226,6 +228,7 @@ lib.makeScope
|
||||
ln-boot = callPackage ./ln-boot { };
|
||||
|
||||
mes = callPackage ./mes { };
|
||||
|
||||
mes-libc = callPackage ./mes/libc.nix { };
|
||||
|
||||
musl11-intermediate = callPackage ./musl/1.1.nix {
|
||||
@@ -233,6 +236,7 @@ lib.makeScope
|
||||
tinycc = tinycc-mes;
|
||||
gnused = gnused-mes;
|
||||
};
|
||||
|
||||
musl11 = callPackage ./musl/1.1.nix {
|
||||
bash = bash_2_05;
|
||||
tinycc = tinycc-musl-intermediate;
|
||||
@@ -260,7 +264,9 @@ lib.makeScope
|
||||
;
|
||||
|
||||
tinycc-bootstrappable = lib.recurseIntoAttrs (callPackage ./tinycc/bootstrappable.nix { });
|
||||
|
||||
tinycc-mes = lib.recurseIntoAttrs (callPackage ./tinycc/mes.nix { });
|
||||
|
||||
tinycc-musl-intermediate = lib.recurseIntoAttrs (
|
||||
callPackage ./tinycc/musl.nix {
|
||||
bash = bash_2_05;
|
||||
@@ -268,6 +274,7 @@ lib.makeScope
|
||||
tinycc = tinycc-mes;
|
||||
}
|
||||
);
|
||||
|
||||
tinycc-musl = lib.recurseIntoAttrs (
|
||||
callPackage ./tinycc/musl.nix {
|
||||
bash = bash_2_05;
|
||||
@@ -276,6 +283,12 @@ lib.makeScope
|
||||
}
|
||||
);
|
||||
|
||||
gawk-static = callPackage ./gawk/static.nix {
|
||||
gcc = gcc-latest;
|
||||
gnumake = gnumake-musl;
|
||||
gnutar = gnutar-latest;
|
||||
};
|
||||
|
||||
xz = callPackage ./xz {
|
||||
bash = bash_2_05;
|
||||
tinycc = tinycc-musl;
|
||||
@@ -303,8 +316,9 @@ lib.makeScope
|
||||
echo ${coreutils-static.tests.get-version}
|
||||
echo ${diffutils.tests.get-version}
|
||||
echo ${findutils.tests.get-version}
|
||||
echo ${gawk-mes.tests.get-version}
|
||||
echo ${gawk.tests.get-version}
|
||||
echo ${gawk-mes.tests.get-version}
|
||||
echo ${gawk-static.tests.get-version}
|
||||
echo ${gcc46.tests.get-version}
|
||||
echo ${gcc46-cxx.tests.hello-world}
|
||||
echo ${gcc8.tests.hello-world}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
{
|
||||
lib,
|
||||
buildPlatform,
|
||||
hostPlatform,
|
||||
fetchurl,
|
||||
bash,
|
||||
gcc,
|
||||
musl,
|
||||
binutils,
|
||||
gnumake,
|
||||
gnused,
|
||||
gnugrep,
|
||||
gawk,
|
||||
diffutils,
|
||||
findutils,
|
||||
gnutar,
|
||||
gzip,
|
||||
}:
|
||||
let
|
||||
inherit (import ./common.nix { inherit lib; }) meta;
|
||||
pname = "gawk-static";
|
||||
version = "5.3.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/gawk/gawk-${version}.tar.gz";
|
||||
hash = "sha256-hjmhqI+0EaG+AmY3OdA+kCptMTtcb+Ak0L/rM0GhmhE=";
|
||||
};
|
||||
in
|
||||
bash.runCommand "${pname}-${version}"
|
||||
{
|
||||
inherit pname version meta;
|
||||
|
||||
nativeBuildInputs = [
|
||||
gcc
|
||||
musl
|
||||
binutils
|
||||
gnumake
|
||||
gnused
|
||||
gnugrep
|
||||
gawk
|
||||
diffutils
|
||||
findutils
|
||||
gnutar
|
||||
gzip
|
||||
];
|
||||
|
||||
passthru.tests.get-version =
|
||||
result:
|
||||
bash.runCommand "${pname}-get-version-${version}" { } ''
|
||||
${result}/bin/awk --version
|
||||
mkdir $out
|
||||
'';
|
||||
}
|
||||
''
|
||||
# Unpack
|
||||
tar xf ${src}
|
||||
cd gawk-${version}
|
||||
|
||||
# Configure
|
||||
bash ./configure \
|
||||
--prefix=$out \
|
||||
--build=${buildPlatform.config} \
|
||||
--host=${hostPlatform.config} \
|
||||
CC=musl-gcc \
|
||||
CFLAGS=-static
|
||||
|
||||
# Build
|
||||
make -j $NIX_BUILD_CORES
|
||||
|
||||
# Install
|
||||
make -j $NIX_BUILD_CORES install
|
||||
rm $out/bin/gawkbug
|
||||
''
|
||||
Reference in New Issue
Block a user