Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
68 lines
1.2 KiB
Nix
68 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildPlatform,
|
|
hostPlatform,
|
|
fetchurl,
|
|
bash,
|
|
gnumake,
|
|
tinycc,
|
|
gnused,
|
|
gnugrep,
|
|
gnutar,
|
|
gzip,
|
|
}:
|
|
|
|
let
|
|
inherit (import ./common.nix { inherit lib; }) meta;
|
|
pname = "gnused";
|
|
# last version that can be bootstrapped with our slightly buggy gnused-mes
|
|
version = "4.2";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://gnu/sed/sed-${version}.tar.gz";
|
|
hash = "sha256-20XNY/0BDmUFN9ZdXfznaJplJ0UjZgbl5ceCk3Jn2YM=";
|
|
};
|
|
in
|
|
bash.runCommand "${pname}-${version}"
|
|
{
|
|
inherit pname version meta;
|
|
|
|
nativeBuildInputs = [
|
|
gnumake
|
|
tinycc.compiler
|
|
gnused
|
|
gnugrep
|
|
gnutar
|
|
gzip
|
|
];
|
|
|
|
passthru.tests.get-version =
|
|
result:
|
|
bash.runCommand "${pname}-get-version-${version}" { } ''
|
|
${result}/bin/sed --version
|
|
mkdir ''${out}
|
|
'';
|
|
}
|
|
''
|
|
# Unpack
|
|
tar xzf ${src}
|
|
cd sed-${version}
|
|
|
|
# Configure
|
|
export CC="tcc -B ${tinycc.libs}/lib"
|
|
export LD=tcc
|
|
./configure \
|
|
--build=${buildPlatform.config} \
|
|
--host=${hostPlatform.config} \
|
|
--disable-shared \
|
|
--disable-nls \
|
|
--disable-dependency-tracking \
|
|
--prefix=$out
|
|
|
|
# Build
|
|
make AR="tcc -ar"
|
|
|
|
# Install
|
|
make install
|
|
''
|