diff options
author | Emily Trau <emily@downunderctf.com> | 2023-10-06 19:12:15 -0700 |
---|---|---|
committer | Emily Trau <emily@downunderctf.com> | 2023-10-07 18:20:25 -0700 |
commit | 8845824045b957529542713f1166d565b52a2736 (patch) | |
tree | e5694abd70f08fd87f7b7c686b4e99d14087bdaf | |
parent | 9b1f1cf7164767733f852faf824b1c5a7a9fd4d1 (diff) | |
download | nixpkgs-8845824045b957529542713f1166d565b52a2736.tar nixpkgs-8845824045b957529542713f1166d565b52a2736.tar.gz nixpkgs-8845824045b957529542713f1166d565b52a2736.tar.bz2 nixpkgs-8845824045b957529542713f1166d565b52a2736.tar.lz nixpkgs-8845824045b957529542713f1166d565b52a2736.tar.xz nixpkgs-8845824045b957529542713f1166d565b52a2736.tar.zst nixpkgs-8845824045b957529542713f1166d565b52a2736.zip |
minimal-bootstrap.gnutar-latest: init at 1.35
-rw-r--r-- | pkgs/os-specific/linux/minimal-bootstrap/default.nix | 8 | ||||
-rw-r--r-- | pkgs/os-specific/linux/minimal-bootstrap/gnutar/latest.nix | 71 |
2 files changed, 79 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/minimal-bootstrap/default.nix b/pkgs/os-specific/linux/minimal-bootstrap/default.nix index 2e48c91ca3d..5cf7c1638cf 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/default.nix +++ b/pkgs/os-specific/linux/minimal-bootstrap/default.nix @@ -142,6 +142,13 @@ lib.makeScope gnused = gnused-mes; }; + # FIXME: better package naming scheme + gnutar-latest = callPackage ./gnutar/latest.nix { + gcc = gcc46; + gnumake = gnumake-musl; + gnutarBoot = gnutar-musl; + }; + gzip = callPackage ./gzip { bash = bash_2_05; tinycc = tinycc-mes; @@ -212,6 +219,7 @@ lib.makeScope echo ${gnused-mes.tests.get-version} echo ${gnutar.tests.get-version} echo ${gnutar-musl.tests.get-version} + echo ${gnutar-latest.tests.get-version} echo ${gzip.tests.get-version} echo ${heirloom.tests.get-version} echo ${mes.compiler.tests.get-version} diff --git a/pkgs/os-specific/linux/minimal-bootstrap/gnutar/latest.nix b/pkgs/os-specific/linux/minimal-bootstrap/gnutar/latest.nix new file mode 100644 index 00000000000..717ea9868fd --- /dev/null +++ b/pkgs/os-specific/linux/minimal-bootstrap/gnutar/latest.nix @@ -0,0 +1,71 @@ +{ lib +, buildPlatform +, hostPlatform +, fetchurl +, bash +, gcc +, musl +, binutils +, gnumake +, gnused +, gnugrep +, gawk +, gzip +, gnutarBoot +}: +let + pname = "gnutar"; + version = "1.35"; + + src = fetchurl { + url = "mirror://gnu/tar/tar-${version}.tar.gz"; + hash = "sha256-FNVeMgY+qVJuBX+/Nfyr1TN452l4fv95GcN1WwLStX4="; + }; +in +bash.runCommand "${pname}-${version}" { + inherit pname version; + + nativeBuildInputs = [ + gcc + musl + binutils + gnumake + gnused + gnugrep + gawk + gzip + gnutarBoot + ]; + + 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 + tar xzf ${src} + cd tar-${version} + + # Configure + bash ./configure \ + --prefix=$out \ + --build=${buildPlatform.config} \ + --host=${hostPlatform.config} \ + CC=musl-gcc + + # Build + make -j $NIX_BUILD_CORES + + # Install + make -j $NIX_BUILD_CORES install +'' |