minimal-bootstrap.bash-static: init at 5.2.15
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
bash_2_05,
|
||||
}:
|
||||
let
|
||||
inherit (import ./common.nix { inherit lib; }) meta;
|
||||
pname = "bash";
|
||||
version = "2.05b";
|
||||
|
||||
@@ -69,7 +70,7 @@ let
|
||||
in
|
||||
kaem.runCommand "${pname}-${version}"
|
||||
{
|
||||
inherit pname version;
|
||||
inherit pname version meta;
|
||||
|
||||
nativeBuildInputs = [
|
||||
tinycc.compiler
|
||||
@@ -124,14 +125,6 @@ kaem.runCommand "${pname}-${version}"
|
||||
${result}/bin/bash --version
|
||||
mkdir ''${out}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "GNU Bourne-Again Shell, the de facto standard shell on Linux";
|
||||
homepage = "https://www.gnu.org/software/bash";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
teams = [ lib.teams.minimal-bootstrap ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
''
|
||||
# Unpack
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{ lib }:
|
||||
{
|
||||
meta = {
|
||||
description = "GNU Bourne-Again Shell, the de facto standard shell on Linux";
|
||||
homepage = "https://www.gnu.org/software/bash";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
teams = [ lib.teams.minimal-bootstrap ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
@@ -18,6 +18,7 @@
|
||||
coreutils,
|
||||
}:
|
||||
let
|
||||
inherit (import ./common.nix { inherit lib; }) meta;
|
||||
pname = "bash";
|
||||
version = "5.2.37";
|
||||
|
||||
@@ -33,7 +34,7 @@ let
|
||||
in
|
||||
bootBash.runCommand "${pname}-${version}"
|
||||
{
|
||||
inherit pname version;
|
||||
inherit pname version meta;
|
||||
|
||||
nativeBuildInputs = [
|
||||
coreutils
|
||||
@@ -85,24 +86,15 @@ bootBash.runCommand "${pname}-${version}"
|
||||
}
|
||||
// (removeAttrs env [ "nativeBuildInputs" ])
|
||||
);
|
||||
|
||||
passthru.tests.get-version =
|
||||
result:
|
||||
bootBash.runCommand "${pname}-get-version-${version}" { } ''
|
||||
${result}/bin/bash --version
|
||||
mkdir $out
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "GNU Bourne-Again Shell, the de facto standard shell on Linux";
|
||||
homepage = "https://www.gnu.org/software/bash";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
teams = [ lib.teams.minimal-bootstrap ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
''
|
||||
# Unpack
|
||||
# unpack
|
||||
tar xzf ${src}
|
||||
cd bash-${version}
|
||||
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
{
|
||||
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 = "bash-static";
|
||||
version = "5.2.15";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/bash/bash-${version}.tar.gz";
|
||||
sha256 = "132qng0jy600mv1fs95ylnlisx2wavkkgpb19c6kmz7lnmjhjwhk";
|
||||
};
|
||||
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/bash --version
|
||||
mkdir $out
|
||||
'';
|
||||
}
|
||||
''
|
||||
# Unpack
|
||||
tar xf ${src}
|
||||
cd bash-${version}
|
||||
|
||||
# Configure
|
||||
bash ./configure \
|
||||
--prefix=$out \
|
||||
--build=${buildPlatform.config} \
|
||||
--host=${hostPlatform.config} \
|
||||
--without-bash-malloc \
|
||||
--enable-static-link \
|
||||
bash_cv_func_strtoimax=y \
|
||||
CC=musl-gcc
|
||||
|
||||
# Build
|
||||
make -j $NIX_BUILD_CORES
|
||||
|
||||
# Install
|
||||
make -j $NIX_BUILD_CORES install-strip
|
||||
rm $out/bin/bashbug
|
||||
''
|
||||
@@ -40,6 +40,12 @@ lib.makeScope
|
||||
gnutar = gnutar-musl;
|
||||
};
|
||||
|
||||
bash-static = callPackage ./bash/static.nix {
|
||||
gcc = gcc-latest;
|
||||
gnumake = gnumake-musl;
|
||||
gnutar = gnutar-latest;
|
||||
};
|
||||
|
||||
binutils = callPackage ./binutils {
|
||||
tinycc = tinycc-musl;
|
||||
gnumake = gnumake-musl;
|
||||
@@ -359,9 +365,9 @@ lib.makeScope
|
||||
};
|
||||
|
||||
inherit (callPackage ./utils.nix { }) derivationWithMeta writeTextFile writeText;
|
||||
|
||||
test = kaem.runCommand "minimal-bootstrap-test" { } ''
|
||||
echo ${bash.tests.get-version}
|
||||
echo ${bash-static.tests.get-version}
|
||||
echo ${bash_2_05.tests.get-version}
|
||||
echo ${binutils.tests.get-version}
|
||||
echo ${binutils-static.tests.get-version}
|
||||
|
||||
Reference in New Issue
Block a user