Loading pkgs/os-specific/linux/minimal-bootstrap/default.nix +8 −0 Original line number Diff line number Diff line Loading @@ -187,6 +187,12 @@ lib.makeScope gnumakeBoot = gnumake; }; gnumake-static = callPackage ./gnumake/static.nix { gcc = gcc-latest; gnumake = gnumake-musl; gnutar = gnutar-latest; }; gnupatch = callPackage ./gnupatch { tinycc = tinycc-mes; }; gnused = callPackage ./gnused { Loading Loading @@ -354,6 +360,8 @@ lib.makeScope echo ${gnugrep.tests.get-version} echo ${gnugrep-static.tests.get-version} echo ${gnum4.tests.get-version} echo ${gnumake-musl.tests.get-version} echo ${gnumake-static.tests.get-version} echo ${gnused.tests.get-version} echo ${gnused-mes.tests.get-version} echo ${gnused-static.tests.get-version} Loading pkgs/os-specific/linux/minimal-bootstrap/gnumake/common.nix 0 → 100644 +11 −0 Original line number Diff line number Diff line { lib }: { meta = { description = "A tool to control the generation of non-source files from sources"; homepage = "https://www.gnu.org/software/make"; license = lib.licenses.gpl3Plus; teams = [ lib.teams.minimal-bootstrap ]; mainProgram = "make"; platforms = lib.platforms.unix; }; } pkgs/os-specific/linux/minimal-bootstrap/gnumake/default.nix +2 −10 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ gnupatch, }: let inherit (import ./common.nix { inherit lib; }) meta; pname = "gnumake"; version = "4.4.1"; Loading Loading @@ -156,21 +157,12 @@ let in kaem.runCommand "${pname}-${version}" { inherit pname version; inherit pname version meta; nativeBuildInputs = [ tinycc.compiler gnupatch ]; meta = { description = "Tool to control the generation of non-source files from sources"; homepage = "https://www.gnu.org/software/make"; license = lib.licenses.gpl3Plus; teams = [ lib.teams.minimal-bootstrap ]; mainProgram = "make"; platforms = lib.platforms.unix; }; } '' # Unpack Loading pkgs/os-specific/linux/minimal-bootstrap/gnumake/musl.nix +2 −10 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ gzip, }: let inherit (import ./common.nix { inherit lib; }) meta; pname = "gnumake-musl"; version = "4.4.1"; Loading @@ -33,7 +34,7 @@ let in bash.runCommand "${pname}-${version}" { inherit pname version; inherit pname version meta; nativeBuildInputs = [ tinycc.compiler Loading @@ -52,15 +53,6 @@ bash.runCommand "${pname}-${version}" ${result}/bin/make --version mkdir $out ''; meta = { description = "Tool to control the generation of non-source files from sources"; homepage = "https://www.gnu.org/software/make"; license = lib.licenses.gpl3Plus; teams = [ lib.teams.minimal-bootstrap ]; mainProgram = "make"; platforms = lib.platforms.unix; }; } '' # Unpack Loading pkgs/os-specific/linux/minimal-bootstrap/gnumake/static.nix 0 → 100644 +86 −0 Original line number Diff line number Diff line { lib, buildPlatform, hostPlatform, fetchurl, bash, gcc, musl, binutils, gnumake, gnupatch, gnused, gnugrep, gawk, diffutils, findutils, gnutar, gzip, }: let inherit (import ./common.nix { inherit lib; }) meta; pname = "gnumake-static"; version = "4.4.1"; src = fetchurl { url = "mirror://gnu/make/make-${version}.tar.gz"; hash = "sha256-3Rb7HWe/q3mnL16DkHNcSePo5wtJRaFasfgd23hlj7M="; }; patches = [ # Replaces /bin/sh with sh, see patch file for reasoning ./0001-No-impure-bin-sh.patch # Purity: don't look for library dependencies (of the form `-lfoo') in /lib # and /usr/lib. It's a stupid feature anyway. Likewise, when searching for # included Makefiles, don't look in /usr/include and friends. ./0002-remove-impure-dirs.patch ]; in bash.runCommand "${pname}-${version}" { inherit pname version meta; nativeBuildInputs = [ gcc musl binutils gnumake gnupatch gnused gnugrep gawk diffutils findutils gnutar gzip ]; passthru.tests.get-version = result: bash.runCommand "${pname}-get-version-${version}" { } '' ${result}/bin/make --version mkdir $out ''; } '' # Unpack tar xf ${src} cd make-${version} # Patch ${lib.concatMapStringsSep "\n" (f: "patch -Np1 -i ${f}") patches} # Configure bash ./configure \ --prefix=$out \ --build=${buildPlatform.config} \ --host=${hostPlatform.config} \ CC=musl-gcc \ CFLAGS=-static # Build make -j $NIX_BUILD_CORES # Install make -j $NIX_BUILD_CORES install '' Loading
pkgs/os-specific/linux/minimal-bootstrap/default.nix +8 −0 Original line number Diff line number Diff line Loading @@ -187,6 +187,12 @@ lib.makeScope gnumakeBoot = gnumake; }; gnumake-static = callPackage ./gnumake/static.nix { gcc = gcc-latest; gnumake = gnumake-musl; gnutar = gnutar-latest; }; gnupatch = callPackage ./gnupatch { tinycc = tinycc-mes; }; gnused = callPackage ./gnused { Loading Loading @@ -354,6 +360,8 @@ lib.makeScope echo ${gnugrep.tests.get-version} echo ${gnugrep-static.tests.get-version} echo ${gnum4.tests.get-version} echo ${gnumake-musl.tests.get-version} echo ${gnumake-static.tests.get-version} echo ${gnused.tests.get-version} echo ${gnused-mes.tests.get-version} echo ${gnused-static.tests.get-version} Loading
pkgs/os-specific/linux/minimal-bootstrap/gnumake/common.nix 0 → 100644 +11 −0 Original line number Diff line number Diff line { lib }: { meta = { description = "A tool to control the generation of non-source files from sources"; homepage = "https://www.gnu.org/software/make"; license = lib.licenses.gpl3Plus; teams = [ lib.teams.minimal-bootstrap ]; mainProgram = "make"; platforms = lib.platforms.unix; }; }
pkgs/os-specific/linux/minimal-bootstrap/gnumake/default.nix +2 −10 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ gnupatch, }: let inherit (import ./common.nix { inherit lib; }) meta; pname = "gnumake"; version = "4.4.1"; Loading Loading @@ -156,21 +157,12 @@ let in kaem.runCommand "${pname}-${version}" { inherit pname version; inherit pname version meta; nativeBuildInputs = [ tinycc.compiler gnupatch ]; meta = { description = "Tool to control the generation of non-source files from sources"; homepage = "https://www.gnu.org/software/make"; license = lib.licenses.gpl3Plus; teams = [ lib.teams.minimal-bootstrap ]; mainProgram = "make"; platforms = lib.platforms.unix; }; } '' # Unpack Loading
pkgs/os-specific/linux/minimal-bootstrap/gnumake/musl.nix +2 −10 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ gzip, }: let inherit (import ./common.nix { inherit lib; }) meta; pname = "gnumake-musl"; version = "4.4.1"; Loading @@ -33,7 +34,7 @@ let in bash.runCommand "${pname}-${version}" { inherit pname version; inherit pname version meta; nativeBuildInputs = [ tinycc.compiler Loading @@ -52,15 +53,6 @@ bash.runCommand "${pname}-${version}" ${result}/bin/make --version mkdir $out ''; meta = { description = "Tool to control the generation of non-source files from sources"; homepage = "https://www.gnu.org/software/make"; license = lib.licenses.gpl3Plus; teams = [ lib.teams.minimal-bootstrap ]; mainProgram = "make"; platforms = lib.platforms.unix; }; } '' # Unpack Loading
pkgs/os-specific/linux/minimal-bootstrap/gnumake/static.nix 0 → 100644 +86 −0 Original line number Diff line number Diff line { lib, buildPlatform, hostPlatform, fetchurl, bash, gcc, musl, binutils, gnumake, gnupatch, gnused, gnugrep, gawk, diffutils, findutils, gnutar, gzip, }: let inherit (import ./common.nix { inherit lib; }) meta; pname = "gnumake-static"; version = "4.4.1"; src = fetchurl { url = "mirror://gnu/make/make-${version}.tar.gz"; hash = "sha256-3Rb7HWe/q3mnL16DkHNcSePo5wtJRaFasfgd23hlj7M="; }; patches = [ # Replaces /bin/sh with sh, see patch file for reasoning ./0001-No-impure-bin-sh.patch # Purity: don't look for library dependencies (of the form `-lfoo') in /lib # and /usr/lib. It's a stupid feature anyway. Likewise, when searching for # included Makefiles, don't look in /usr/include and friends. ./0002-remove-impure-dirs.patch ]; in bash.runCommand "${pname}-${version}" { inherit pname version meta; nativeBuildInputs = [ gcc musl binutils gnumake gnupatch gnused gnugrep gawk diffutils findutils gnutar gzip ]; passthru.tests.get-version = result: bash.runCommand "${pname}-get-version-${version}" { } '' ${result}/bin/make --version mkdir $out ''; } '' # Unpack tar xf ${src} cd make-${version} # Patch ${lib.concatMapStringsSep "\n" (f: "patch -Np1 -i ${f}") patches} # Configure bash ./configure \ --prefix=$out \ --build=${buildPlatform.config} \ --host=${hostPlatform.config} \ CC=musl-gcc \ CFLAGS=-static # Build make -j $NIX_BUILD_CORES # Install make -j $NIX_BUILD_CORES install ''