mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 10:53:11 +00:00
minimal-bootstrap.gnutar: init at 1.12
This commit is contained in:
parent
8c8b03ba9e
commit
5be78a1b0f
@ -34,6 +34,11 @@ lib.makeScope
|
||||
tinycc = tinycc-mes;
|
||||
};
|
||||
|
||||
gnutar = callPackage ./gnutar {
|
||||
bash = bash_2_05;
|
||||
tinycc = tinycc-mes;
|
||||
};
|
||||
|
||||
ln-boot = callPackage ./ln-boot { };
|
||||
|
||||
mes = callPackage ./mes { };
|
||||
@ -53,6 +58,7 @@ lib.makeScope
|
||||
echo ${gawk.tests.get-version}
|
||||
echo ${gnugrep.tests.get-version}
|
||||
echo ${gnused.tests.get-version}
|
||||
echo ${gnutar.tests.get-version}
|
||||
echo ${mes.compiler.tests.get-version}
|
||||
echo ${tinycc-mes.compiler.tests.chain}
|
||||
mkdir ''${out}
|
||||
|
65
pkgs/os-specific/linux/minimal-bootstrap/gnutar/default.nix
Normal file
65
pkgs/os-specific/linux/minimal-bootstrap/gnutar/default.nix
Normal file
@ -0,0 +1,65 @@
|
||||
{ lib
|
||||
, buildPlatform
|
||||
, hostPlatform
|
||||
, fetchurl
|
||||
, bash
|
||||
, tinycc
|
||||
, gnumake
|
||||
, gnused
|
||||
, gnugrep
|
||||
}:
|
||||
let
|
||||
pname = "gnutar";
|
||||
# >= 1.13 is incompatible with mes-libc
|
||||
version = "1.12";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/tar/tar-${version}.tar.gz";
|
||||
sha256 = "02m6gajm647n8l9a5bnld6fnbgdpyi4i3i83p7xcwv0kif47xhy6";
|
||||
};
|
||||
in
|
||||
bash.runCommand "${pname}-${version}" {
|
||||
inherit pname version;
|
||||
|
||||
nativeBuildInputs = [
|
||||
tinycc.compiler
|
||||
gnumake
|
||||
gnused
|
||||
gnugrep
|
||||
];
|
||||
|
||||
passthru.tests.get-version = result:
|
||||
bash.runCommand "${pname}-get-version-${version}" {} ''
|
||||
${result}/bin/tar --version
|
||||
mkdir $out
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "GNU implementation of the `tar' archiver";
|
||||
homepage = "https://www.gnu.org/software/tar";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = teams.minimal-bootstrap.members;
|
||||
mainProgram = "tar";
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
} ''
|
||||
# Unpack
|
||||
ungz --file ${src} --output tar.tar
|
||||
untar --file tar.tar
|
||||
rm tar.tar
|
||||
cd tar-${version}
|
||||
|
||||
# Configure
|
||||
export CC="tcc -static -B ${tinycc.libs}/lib"
|
||||
bash ./configure \
|
||||
--build=${buildPlatform.config} \
|
||||
--host=${hostPlatform.config} \
|
||||
--disable-nls \
|
||||
--prefix=$out
|
||||
|
||||
# Build
|
||||
make AR="tcc -ar"
|
||||
|
||||
# Install
|
||||
make install
|
||||
''
|
Loading…
Reference in New Issue
Block a user