Compare commits

..

2 commits

Author SHA1 Message Date
Alex Kladov 8233d4aedf use correct name for topological sort (#5)
I am 0.8 sure this is a typo, I've never seen this being referred to as topographic sorting!

Reviewed-on: #5
Reviewed-by: Jake Hamilton <jake.hamilton@hey.com>
Co-authored-by: Alex Kladov <aleksey.kladov@gmail.com>
Co-committed-by: Alex Kladov <aleksey.kladov@gmail.com>
2024-06-23 18:39:30 +00:00
Steve D a2f0a06426 Fix non-deterministic "missing: Permission denied" errors (#4)
Make 'missing' executable where source tarballs use autotools and are unpacked with untar.  untar doesn't preserve or set mtime, which may result in autotools generated files, e.g. configure, having newer timestamps than their source files (e.g. configure.in.) In these circumstances autotools generated Makefiles will call 'missing' to either regenerate them or fix-up the timestamps.

Reviewed-on: #4
Reviewed-by: isabel roses <isabel@isabelroses.com>
Reviewed-by: Jake Hamilton <jake.hamilton@hey.com>
Co-authored-by: Steve Dodd <steved424@gmail.com>
Co-committed-by: Steve Dodd <steved424@gmail.com>
2024-06-23 17:32:11 +00:00
77 changed files with 173 additions and 397 deletions

View file

@ -14,10 +14,7 @@
modules = import ./src;
forEachSystem = lib.attrs.generate [
"i686-linux"
"x86_64-linux"
];
forEachSystem = lib.attrs.generate [ "i686-linux" ];
in
{
extras =

View file

@ -34,10 +34,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -42,10 +42,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -125,10 +125,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -41,10 +41,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -33,10 +33,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -34,10 +34,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -35,10 +35,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -35,10 +35,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -36,10 +36,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -37,10 +37,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -38,10 +38,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -39,10 +39,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -40,10 +40,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -41,10 +41,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -40,10 +40,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -40,10 +40,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -31,10 +31,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -34,10 +34,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
mainProgram = lib.options.create {
@ -109,8 +106,7 @@ in
export CC="tcc -B ${stage1.tinycc.musl.libs.package}/lib"
export AR="tcc -ar"
export LD=tcc
chmod +x ./configure
./configure \
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host} \

View file

@ -32,10 +32,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};
@ -133,8 +130,7 @@ in
export AR="tcc -ar"
export lt_cv_sys_max_cmd_len=32768
export CFLAGS="-D__LITTLE_ENDIAN__=1"
chmod +x ./configure
./configure ${builtins.concatStringsSep " " configureFlags}
bash ./configure ${builtins.concatStringsSep " " configureFlags}
# Build
make -j $NIX_BUILD_CORES all-libiberty all-gas all-bfd all-libctf all-zlib all-gprof

View file

@ -32,10 +32,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};
@ -89,8 +86,7 @@ in
cd bison-${cfg.version}
# Configure
chmod +x ./configure
./configure \
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host} \

View file

@ -33,10 +33,7 @@ in
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
# TODO: Support more platforms.
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -34,10 +34,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};
@ -101,8 +98,7 @@ in
# Configure
export CC="tcc -B ${stage1.tinycc.musl.libs.package}/lib"
export LD=tcc
chmod +x ./configure
./configure ${builtins.concatStringsSep " " configureFlags}
bash ./configure ${builtins.concatStringsSep " " configureFlags}
# Build
make -j $NIX_BUILD_CORES AR="tcc -ar" MAKEINFO="true"

View file

@ -32,10 +32,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};
@ -90,8 +87,7 @@ in
# Configure
export CC="tcc -B ${stage1.tinycc.musl.libs.package}/lib"
export LD=tcc
chmod +x ./configure
./configure \
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host}

View file

@ -32,10 +32,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};
@ -95,8 +92,7 @@ in
export CC="tcc -B ${stage1.tinycc.musl.libs.package}/lib"
export AR="tcc -ar"
export LD=tcc
chmod +x ./configure
./configure \
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host}

View file

@ -68,8 +68,8 @@ in
export CC="tcc -B ${stage1.tinycc.mes.libs.package}/lib"
export ac_cv_func_getpgrp_void=yes
export ac_cv_func_tzset=yes
chmod +x ./configure
./configure \
chmod 0755 missing
bash ./configure \
--build=${platform.build} \
--host=${platform.host} \
--disable-nls \

View file

@ -34,10 +34,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
mainProgram = lib.options.create {
@ -96,8 +93,7 @@ in
export CC="tcc -B ${stage1.tinycc.musl.libs.package}/lib"
export AR="tcc -ar"
export LD=tcc
chmod +x ./configure
./configure \
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host}

View file

@ -38,10 +38,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};
@ -200,8 +197,7 @@ in
export CFLAGS_FOR_TARGET="-Wl,-dynamic-linker -Wl,${stage1.musl.package}/lib/libc.so"
export LIBRARY_PATH="${stage1.musl.package}/lib"
chmod +x ./configure
./configure \
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host} \

View file

@ -162,8 +162,7 @@ in
export CPLUS_INCLUDE_PATH="$C_INCLUDE_PATH"
export LIBRARY_PATH="${stage1.musl.package}/lib"
chmod +x ./configure
./configure \
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host} \

View file

@ -163,8 +163,7 @@ in
export ac_cv_func_memcpy=yes
export ac_cv_func_strerror=yes
chmod +x ./configure
./configure \
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host} \

View file

@ -167,8 +167,7 @@ in
export CPLUS_INCLUDE_PATH="$C_INCLUDE_PATH"
export LIBRARY_PATH="${stage1.musl.package}/lib"
chmod +x ./configure
./configure \
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host} \

View file

@ -31,10 +31,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
mainProgram = lib.options.create {

View file

@ -32,10 +32,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};
@ -88,8 +85,7 @@ in
cd m4-${cfg.version}
# Configure
chmod +x ./configure
./configure \
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host} \

View file

@ -34,10 +34,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};
@ -104,8 +101,7 @@ in
# Configure
export CC="tcc -B ${stage1.tinycc.musl.libs.package}/lib"
export LD=tcc
chmod +x ./configure
./configure \
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host}

View file

@ -31,10 +31,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -34,10 +34,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
mainProgram = lib.options.create {

View file

@ -34,44 +34,44 @@ in
sha256 = "02m6gajm647n8l9a5bnld6fnbgdpyi4i3i83p7xcwv0kif47xhy6";
};
package = builders.bash.boot.build {
name = "gnutar-boot-${cfg.version}";
package =
let
in
builders.bash.boot.build {
name = "gnutar-boot-${cfg.version}";
meta = stage1.gnutar.meta;
meta = stage1.gnutar.meta;
deps.build.host = [
stage1.tinycc.mes.compiler.package
stage1.gnumake.boot.package
stage1.gnused.boot.package
stage1.gnugrep.package
];
deps.build.host = [
stage1.tinycc.mes.compiler.package
stage1.gnumake.boot.package
stage1.gnused.boot.package
stage1.gnugrep.package
];
script = ''
# Unpack
ungz --file ${cfg.src} --output tar.tar
untar --file tar.tar
rm tar.tar
cd tar-${cfg.version}
script = ''
# Unpack
ungz --file ${cfg.src} --output tar.tar
untar --file tar.tar
rm tar.tar
cd tar-${cfg.version}
# Fix source permissions
chmod -R +r .
chmod +x ./configure
# Configure
export CC="tcc -B ${stage1.tinycc.mes.libs.package}/lib"
chmod 0755 missing
bash ./configure \
--build=${platform.build} \
--host=${platform.host} \
--disable-nls \
--prefix=$out
# Configure
export CC="tcc -B ${stage1.tinycc.mes.libs.package}/lib"
./configure \
--build=${platform.build} \
--host=${platform.host} \
--disable-nls \
--prefix=$out
# Build
make AR="tcc -ar"
# Build
make AR="tcc -ar"
# Install
make install
'';
};
# Install
make install
'';
};
};
};
}

View file

@ -37,10 +37,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
mainProgram = lib.options.create {
@ -98,8 +95,7 @@ in
cd tar-${cfg.version}
# Configure
chmod +x ./configure
./configure \
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host} \

View file

@ -59,8 +59,8 @@ in
export ac_cv_sizeof_unsigned_long=4
export ac_cv_sizeof_long_long=8
export ac_cv_header_netdb_h=no
chmod +x ./configure
./configure \
chmod 0755 missing
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host} \

View file

@ -31,10 +31,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};
@ -63,37 +60,39 @@ in
sha256 = "0ryr5b00qz3xcdcv03qwjdfji8pasp0007ay3ppmk71wl8c1i90w";
};
package = builders.bash.boot.build {
name = "gzip-${cfg.version}";
meta = cfg.meta;
package =
let
in
builders.bash.boot.build {
name = "gzip-${cfg.version}";
meta = cfg.meta;
deps.build.host = [
stage1.tinycc.mes.compiler.package
stage1.gnumake.boot.package
stage1.gnused.boot.package
stage1.gnugrep.package
];
deps.build.host = [
stage1.tinycc.mes.compiler.package
stage1.gnumake.boot.package
stage1.gnused.boot.package
stage1.gnugrep.package
];
script = ''
# Unpack
ungz --file ${cfg.src} --output gzip.tar
untar --file gzip.tar
rm gzip.tar
cd gzip-${cfg.version}
script = ''
# Unpack
ungz --file ${cfg.src} --output gzip.tar
untar --file gzip.tar
rm gzip.tar
cd gzip-${cfg.version}
# Configure
export CC="tcc -B ${stage1.tinycc.mes.libs.package}/lib -Dstrlwr=unused"
chmod +x ./configure
./configure --prefix=$out
# Configure
export CC="tcc -B ${stage1.tinycc.mes.libs.package}/lib -Dstrlwr=unused"
bash ./configure --prefix=$out
# Build
make
# Build
make
# Install
mkdir $out
make install
'';
};
# Install
mkdir $out
make install
'';
};
};
};
}

View file

@ -45,10 +45,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -53,10 +53,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};
};

View file

@ -26,10 +26,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -32,10 +32,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -33,10 +33,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -31,10 +31,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -33,10 +33,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -118,8 +118,7 @@ in
src/misc/wordexp.c
# Configure
chmod +x configure
./configure \
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host} \
@ -132,6 +131,7 @@ in
# Install
make install
cp ${stage1.tinycc.mes.libs.package}/lib/libtcc1.a $out/lib
'';
};
};

View file

@ -35,10 +35,7 @@ in
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
# TODO: Support more platforms.
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};
@ -98,8 +95,7 @@ in
src/misc/wordexp.c
# Configure
chmod +x ./configure
./configure \
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host} \

View file

@ -34,10 +34,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -32,10 +32,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};
@ -107,8 +104,7 @@ in
export C_INCLUDE_PATH="${stage1.zlib.package}/include"
export LIBRARY_PATH="${stage1.zlib.package}/lib"
export LD_LIBRARY_PATH="$LIBRARY_PATH"
chmod +x ./configure
./configure \
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host}

View file

@ -38,7 +38,6 @@ in
default.value = [
"x86_64-linux"
"i686-linux"
"x86_64-linux"
];
};
};

View file

@ -37,10 +37,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -35,10 +35,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};
@ -91,8 +88,7 @@ in
export CC="tcc -B ${stage1.tinycc.musl.libs.package}/lib"
export AR="tcc -ar"
export LD=tcc
chmod +x configure
./configure \
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host} \

View file

@ -32,10 +32,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};
@ -86,8 +83,7 @@ in
# Configure
export CC=musl-gcc
chmod +x configure
./configure --prefix=$out
bash ./configure --prefix=$out
# Build
make -j $NIX_BUILD_CORES

View file

@ -32,10 +32,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
mainProgram = lib.options.create {
@ -97,8 +94,7 @@ in
cd bash-${cfg.version}
# Configure
chmod +x ./configure
./configure \
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host} \

View file

@ -32,10 +32,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};
@ -123,8 +120,7 @@ in
${lib.strings.concatMapSep "\n" (file: "patch -Np1 -i ${file}") patches}
# Configure
chmod +x ./configure
./configure ${builtins.concatStringsSep " " configureFlags}
bash ./configure ${builtins.concatStringsSep " " configureFlags}
# Build
make -j $NIX_BUILD_CORES

View file

@ -33,10 +33,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -33,10 +33,7 @@ in
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
# TODO: Support more platforms.
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};

View file

@ -32,10 +32,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};
@ -102,8 +99,7 @@ in
cd coreutils-${cfg.version}
# Configure
chmod +x ./configure
./configure ${builtins.concatStringsSep " " configureFlags}
bash ./configure ${builtins.concatStringsSep " " configureFlags}
# Build
make -j $NIX_BUILD_CORES

View file

@ -32,10 +32,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};
@ -89,8 +86,7 @@ in
cd diffutils-${cfg.version}
# Configure
chmod +x ./configure
./configure \
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host} \

View file

@ -32,10 +32,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};
@ -89,8 +86,7 @@ in
cd findutils-${cfg.version}
# Configure
chmod +x ./configure
./configure \
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host} \

View file

@ -32,10 +32,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
mainProgram = lib.options.create {
@ -95,8 +92,7 @@ in
cd gawk-${cfg.version}
# Configure
chmod +x ./configure
./configure \
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host} \

View file

@ -32,10 +32,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};
@ -194,8 +191,7 @@ in
export CFLAGS_FOR_TARGET="-Wl,-dynamic-linker -Wl,${stage1.musl.package}/lib/libc.so"
export LIBRARY_PATH="${stage1.musl.package}/lib"
chmod +x ./configure
./configure \
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host} \

View file

@ -33,10 +33,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};
@ -94,8 +91,7 @@ in
cd build
# libstdc++.so is built against musl and fails to link
export CXX=false
chmod +x ../configure
../configure \
bash ../configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host} \

View file

@ -32,10 +32,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
mainProgram = lib.options.create {
@ -94,8 +91,7 @@ in
cd grep-${cfg.version}
# Configure
chmod +x ./configure
./configure \
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host} \

View file

@ -33,10 +33,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};
@ -105,8 +102,7 @@ in
${lib.strings.concatMapSep "\n" (file: "patch -Np1 -i ${file}") patches}
# Configure
chmod +x ./configure
./configure \
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host} \

View file

@ -32,10 +32,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};
@ -90,8 +87,7 @@ in
cd patch-${cfg.version}
# Configure
chmod +x ./configure
./configure \
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host} \

View file

@ -32,10 +32,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
mainProgram = lib.options.create {
@ -96,8 +93,7 @@ in
cd sed-${cfg.version}
# Configure
chmod +x ./configure
./configure \
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host} \

View file

@ -32,10 +32,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
mainProgram = lib.options.create {
@ -95,8 +92,7 @@ in
cd tar-${cfg.version}
# Configure
chmod +x ./configure
./configure \
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host} \

View file

@ -32,10 +32,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};
@ -88,8 +85,7 @@ in
cd gzip-${cfg.version}
# Configure
chmod +x ./configure
./configure \
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host} \

View file

@ -33,10 +33,7 @@ in
platforms = lib.options.create {
type = lib.types.list.of lib.types.string;
description = "Platforms the package supports.";
default.value = [
"i686-linux"
"x86_64-linux"
];
default.value = [ "i686-linux" ];
};
};
@ -89,8 +86,7 @@ in
cd patchelf-${cfg.version}
# Configure
chmod +x ./configure
./configure \
bash ./configure \
--prefix=$out \
--build=${platform.build} \
--host=${platform.host} \

View file

@ -3,7 +3,7 @@
options.aux = {
system = lib.options.create {
type = lib.types.string;
default.value = "x86_64-linux";
default.value = "i686-linux";
description = ''
The system to build packages for. This value can be provided as either
`config.aux.system` or by setting the `system` argument for modules.

View file

@ -21,7 +21,7 @@ lib: {
## Apply a topological sort to a DAG.
##
## @type Dag a -> { result :: List a } | { cycle :: List a, loops :: List a }
topographic =
topological =
graph:
let
getEntriesBefore =
@ -43,7 +43,7 @@ lib: {
isBefore = a: b: builtins.elem a.name b.after;
sorted = lib.lists.sort.topographic isBefore entries;
sorted = lib.lists.sort.topological isBefore entries;
in
if sorted ? result then
{

View file

@ -119,11 +119,11 @@ in
};
"sort" = {
"topographic" = {
"topological" = {
"handles an empty graph" =
let
expected = [ ];
actual = lib.dag.sort.topographic { };
actual = lib.dag.sort.topological { };
in
actual.result == expected;
@ -147,7 +147,7 @@ in
value = "d";
}
];
actual = lib.dag.sort.topographic {
actual = lib.dag.sort.topological {
a = lib.dag.entry.anywhere "a";
b = lib.dag.entry.between [ "c" ] [ "a" ] "b";
c = lib.dag.entry.before [ "c" ] "c";

View file

@ -31,15 +31,15 @@ lib: {
in
builtins.map (x: builtins.elemAt x 1) (builtins.sort isLess prepared);
## Perform a topographic sort on a list of items. The predicate function determines whether
## Perform a topological sort on a list of items. The predicate function determines whether
## its first argument comes before the second argument.
##
## @type (a -> a -> Bool) -> List a -> List a
topographic =
topological =
predicate: list:
let
searched = lib.lists.search.depthFirst true predicate list;
results = lib.lists.sort.topographic predicate (searched.visited ++ searched.rest);
results = lib.lists.sort.topological predicate (searched.visited ++ searched.rest);
in
if builtins.length list < 2 then
{ result = list; }

View file

@ -15,7 +15,7 @@ in
package:
let
phases = package.phases;
sorted = lib.dag.sort.topographic phases;
sorted = lib.dag.sort.topological phases;
script = lib.strings.concatMapSep "\n" (
entry: if builtins.isFunction entry.value then entry.value package else entry.value