diff options
author | Emily Trau <emily@downunderctf.com> | 2023-05-22 14:02:16 +1000 |
---|---|---|
committer | Emily Trau <emily@downunderctf.com> | 2023-05-22 22:42:25 +1000 |
commit | d8e94638d1082e9d8c78e2b548b26fef2d46638c (patch) | |
tree | 1de093a8fb77e5e036f8864334c276e37b6a8dd1 /pkgs/os-specific/linux/minimal-bootstrap | |
parent | 5be78a1b0f33657b7ba4430e72f836908941b179 (diff) | |
download | nixlib-d8e94638d1082e9d8c78e2b548b26fef2d46638c.tar nixlib-d8e94638d1082e9d8c78e2b548b26fef2d46638c.tar.gz nixlib-d8e94638d1082e9d8c78e2b548b26fef2d46638c.tar.bz2 nixlib-d8e94638d1082e9d8c78e2b548b26fef2d46638c.tar.lz nixlib-d8e94638d1082e9d8c78e2b548b26fef2d46638c.tar.xz nixlib-d8e94638d1082e9d8c78e2b548b26fef2d46638c.tar.zst nixlib-d8e94638d1082e9d8c78e2b548b26fef2d46638c.zip |
minimal-bootstrap.gzip: init at 1.2.4
Diffstat (limited to 'pkgs/os-specific/linux/minimal-bootstrap')
-rw-r--r-- | pkgs/os-specific/linux/minimal-bootstrap/default.nix | 6 | ||||
-rw-r--r-- | pkgs/os-specific/linux/minimal-bootstrap/gzip/default.nix | 58 |
2 files changed, 64 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/minimal-bootstrap/default.nix b/pkgs/os-specific/linux/minimal-bootstrap/default.nix index f02cd3790c6e..97ce4089ea94 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/default.nix +++ b/pkgs/os-specific/linux/minimal-bootstrap/default.nix @@ -39,6 +39,11 @@ lib.makeScope tinycc = tinycc-mes; }; + gzip = callPackage ./gzip { + bash = bash_2_05; + tinycc = tinycc-mes; + }; + ln-boot = callPackage ./ln-boot { }; mes = callPackage ./mes { }; @@ -59,6 +64,7 @@ lib.makeScope echo ${gnugrep.tests.get-version} echo ${gnused.tests.get-version} echo ${gnutar.tests.get-version} + echo ${gzip.tests.get-version} echo ${mes.compiler.tests.get-version} echo ${tinycc-mes.compiler.tests.chain} mkdir ''${out} diff --git a/pkgs/os-specific/linux/minimal-bootstrap/gzip/default.nix b/pkgs/os-specific/linux/minimal-bootstrap/gzip/default.nix new file mode 100644 index 000000000000..b02486b4d1e1 --- /dev/null +++ b/pkgs/os-specific/linux/minimal-bootstrap/gzip/default.nix @@ -0,0 +1,58 @@ +{ lib +, fetchurl +, bash +, tinycc +, gnumake +, gnused +, gnugrep +}: +let + pname = "gzip"; + version = "1.2.4"; + + src = fetchurl { + url = "mirror://gnu/gzip/gzip-${version}.tar.gz"; + sha256 = "0ryr5b00qz3xcdcv03qwjdfji8pasp0007ay3ppmk71wl8c1i90w"; + }; +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/gzip --version + mkdir $out + ''; + + meta = with lib; { + description = "GNU zip compression program"; + homepage = "https://www.gnu.org/software/gzip"; + license = licenses.gpl3Plus; + maintainers = teams.minimal-bootstrap.members; + platforms = platforms.unix; + }; +} '' + # Unpack + ungz --file ${src} --output gzip.tar + untar --file gzip.tar + rm gzip.tar + cd gzip-${version} + + # Configure + export CC="tcc -static -B ${tinycc.libs}/lib -Dstrlwr=unused" + bash ./configure --prefix=$out + + # Build + make + + # Install + mkdir $out + make install +'' |