diff options
author | Emily Trau <emily@downunderctf.com> | 2023-07-28 02:23:05 -0700 |
---|---|---|
committer | Emily Trau <emily@downunderctf.com> | 2023-07-28 02:23:05 -0700 |
commit | 52ec937b7786187feb97c4570839b100745cb1e6 (patch) | |
tree | 7d3ad386ec83ff9ef20df0e37a334c2173b0f251 /pkgs/os-specific/linux/minimal-bootstrap | |
parent | 8cacc05fbfffeaab910e8c2c9e2a7c6b32ce881a (diff) | |
download | nixlib-52ec937b7786187feb97c4570839b100745cb1e6.tar nixlib-52ec937b7786187feb97c4570839b100745cb1e6.tar.gz nixlib-52ec937b7786187feb97c4570839b100745cb1e6.tar.bz2 nixlib-52ec937b7786187feb97c4570839b100745cb1e6.tar.lz nixlib-52ec937b7786187feb97c4570839b100745cb1e6.tar.xz nixlib-52ec937b7786187feb97c4570839b100745cb1e6.tar.zst nixlib-52ec937b7786187feb97c4570839b100745cb1e6.zip |
minimal-bootstrap.findutils: init at 4.4.2
Diffstat (limited to 'pkgs/os-specific/linux/minimal-bootstrap')
-rw-r--r-- | pkgs/os-specific/linux/minimal-bootstrap/default.nix | 7 | ||||
-rw-r--r-- | pkgs/os-specific/linux/minimal-bootstrap/findutils/default.nix | 72 |
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 1c286e73aa18..3b84795678ef 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/default.nix +++ b/pkgs/os-specific/linux/minimal-bootstrap/default.nix @@ -48,6 +48,12 @@ lib.makeScope glibc = glibc22; }; + findutils = callPackage ./findutils { + bash = bash_2_05; + gcc = gcc2; + glibc = glibc22; + }; + gawk = callPackage ./gawk { bash = bash_2_05; tinycc = tinycc-mes; @@ -141,6 +147,7 @@ lib.makeScope echo ${binutils-mes.tests.get-version} echo ${bzip2.tests.get-version} echo ${diffutils.tests.get-version} + echo ${findutils.tests.get-version} echo ${gawk.tests.get-version} echo ${gcc2.tests.get-version} echo ${gcc2-mes.tests.get-version} diff --git a/pkgs/os-specific/linux/minimal-bootstrap/findutils/default.nix b/pkgs/os-specific/linux/minimal-bootstrap/findutils/default.nix new file mode 100644 index 000000000000..cf26abd21383 --- /dev/null +++ b/pkgs/os-specific/linux/minimal-bootstrap/findutils/default.nix @@ -0,0 +1,72 @@ +{ lib +, buildPlatform +, hostPlatform +, fetchurl +, bash +, gcc +, glibc +, binutils +, linux-headers +, gnumake +, gnugrep +, gnused +, gawk +, gnutar +, gzip +}: +let + pname = "findutils"; + version = "4.4.2"; + + src = fetchurl { + url = "mirror://gnu/findutils/findutils-${version}.tar.gz"; + sha256 = "0amn0bbwqvsvvsh6drfwz20ydc2czk374lzw5kksbh6bf78k4ks3"; + }; +in +bash.runCommand "${pname}-${version}" { + inherit pname version; + + nativeBuildInputs = [ + gcc + binutils + gnumake + gnused + gnugrep + gawk + gnutar + gzip + ]; + + passthru.tests.get-version = result: + bash.runCommand "${pname}-get-version-${version}" {} '' + ${result}/bin/find --version + mkdir $out + ''; + + meta = with lib; { + description = "GNU Find Utilities, the basic directory searching utilities of the GNU operating system"; + homepage = "https://www.gnu.org/software/findutils"; + license = licenses.gpl3Plus; + maintainers = teams.minimal-bootstrap.members; + platforms = platforms.unix; + }; +} '' + # Unpack + tar xzf ${src} + cd findutils-${version} + + # Configure + export C_INCLUDE_PATH="${glibc}/include:${linux-headers}/include" + export LIBRARY_PATH="${glibc}/lib" + export LIBS="-lc -lnss_files -lnss_dns -lresolv" + bash ./configure \ + --prefix=$out \ + --build=${buildPlatform.config} \ + --host=${hostPlatform.config} + + # Build + make + + # Install + make install +'' |