Loading pkgs/os-specific/linux/minimal-bootstrap/default.nix +7 −0 Original line number Diff line number Diff line Loading @@ -298,6 +298,12 @@ lib.makeScope gnumake = gnumake-musl; }; patchelf-static = callPackage ./patchelf/static.nix { gcc = gcc-latest; gnumake = gnumake-musl; gnutar = gnutar-latest; }; python = callPackage ./python { gcc = gcc-latest; gnumake = gnumake-musl; Loading Loading @@ -395,6 +401,7 @@ lib.makeScope echo ${heirloom.tests.get-version} echo ${mes.compiler.tests.get-version} echo ${musl.tests.hello-world} echo ${patchelf-static.tests.get-version} echo ${python.tests.get-version} echo ${tinycc-mes.compiler.tests.chain} echo ${tinycc-musl.compiler.tests.hello-world} Loading pkgs/os-specific/linux/minimal-bootstrap/patchelf/static.nix 0 → 100644 +79 −0 Original line number Diff line number Diff line { lib, buildPlatform, hostPlatform, fetchurl, bash, gcc, musl, binutils, gnumake, gnused, gnugrep, gawk, diffutils, findutils, gnutar, gzip, }: let pname = "patchelf-static"; version = "0.18.0"; src = fetchurl { url = "https://github.com/NixOS/patchelf/releases/download/${version}/patchelf-${version}.tar.gz"; sha256 = "sha256-ZN4Q5Ma4uDedt+h/WAMPM26nR8BRXzgRMugQ2/hKhuc="; }; in bash.runCommand "${pname}-${version}" { inherit pname version; nativeBuildInputs = [ gcc musl binutils gnumake gnused gnugrep gawk diffutils findutils gnutar gzip ]; passthru.tests.get-version = result: bash.runCommand "${pname}-get-version-${version}" { } '' ${result}/bin/patchelf --version mkdir $out ''; meta = { description = "A small utility to modify the dynamic linker and RPATH of ELF executables"; homepage = "https://github.com/NixOS/patchelf"; license = lib.licenses.gpl3Plus; platforms = lib.platforms.unix; teams = [ lib.teams.minimal-bootstrap ]; }; } '' # Unpack tar xf ${src} cd patchelf-${version} # Configure bash ./configure \ --prefix=$out \ --build=${buildPlatform.config} \ --host=${hostPlatform.config} \ CC=musl-gcc \ CXXFLAGS=-static # Build make -j $NIX_BUILD_CORES # Install make -j $NIX_BUILD_CORES install-strip '' Loading
pkgs/os-specific/linux/minimal-bootstrap/default.nix +7 −0 Original line number Diff line number Diff line Loading @@ -298,6 +298,12 @@ lib.makeScope gnumake = gnumake-musl; }; patchelf-static = callPackage ./patchelf/static.nix { gcc = gcc-latest; gnumake = gnumake-musl; gnutar = gnutar-latest; }; python = callPackage ./python { gcc = gcc-latest; gnumake = gnumake-musl; Loading Loading @@ -395,6 +401,7 @@ lib.makeScope echo ${heirloom.tests.get-version} echo ${mes.compiler.tests.get-version} echo ${musl.tests.hello-world} echo ${patchelf-static.tests.get-version} echo ${python.tests.get-version} echo ${tinycc-mes.compiler.tests.chain} echo ${tinycc-musl.compiler.tests.hello-world} Loading
pkgs/os-specific/linux/minimal-bootstrap/patchelf/static.nix 0 → 100644 +79 −0 Original line number Diff line number Diff line { lib, buildPlatform, hostPlatform, fetchurl, bash, gcc, musl, binutils, gnumake, gnused, gnugrep, gawk, diffutils, findutils, gnutar, gzip, }: let pname = "patchelf-static"; version = "0.18.0"; src = fetchurl { url = "https://github.com/NixOS/patchelf/releases/download/${version}/patchelf-${version}.tar.gz"; sha256 = "sha256-ZN4Q5Ma4uDedt+h/WAMPM26nR8BRXzgRMugQ2/hKhuc="; }; in bash.runCommand "${pname}-${version}" { inherit pname version; nativeBuildInputs = [ gcc musl binutils gnumake gnused gnugrep gawk diffutils findutils gnutar gzip ]; passthru.tests.get-version = result: bash.runCommand "${pname}-get-version-${version}" { } '' ${result}/bin/patchelf --version mkdir $out ''; meta = { description = "A small utility to modify the dynamic linker and RPATH of ELF executables"; homepage = "https://github.com/NixOS/patchelf"; license = lib.licenses.gpl3Plus; platforms = lib.platforms.unix; teams = [ lib.teams.minimal-bootstrap ]; }; } '' # Unpack tar xf ${src} cd patchelf-${version} # Configure bash ./configure \ --prefix=$out \ --build=${buildPlatform.config} \ --host=${hostPlatform.config} \ CC=musl-gcc \ CXXFLAGS=-static # Build make -j $NIX_BUILD_CORES # Install make -j $NIX_BUILD_CORES install-strip ''