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
99 lines
2.3 KiB
Nix
99 lines
2.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitLab,
|
|
perl,
|
|
icmake,
|
|
util-linux,
|
|
bash,
|
|
versionCheckHook,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "yodl";
|
|
version = "4.05.00";
|
|
|
|
src = fetchFromGitLab {
|
|
owner = "fbb-git";
|
|
repo = "yodl";
|
|
tag = finalAttrs.version;
|
|
hash = "sha256-QnEjMHuZHj+iPlmiPsAcaNF8RRd/Ld59PA1neuzo1Go=";
|
|
};
|
|
|
|
setSourceRoot = ''
|
|
sourceRoot=$(echo */yodl)
|
|
'';
|
|
|
|
postPatch = ''
|
|
for header in media/media.h stack/stack.h message/message.h symbol/symbol.ih symbol/sysp.c hashitem/hashitem.h args/args.h ostream/ostream.h; do
|
|
sed -i '1i#include <stdbool.h>' "$header"
|
|
done
|
|
patchShebangs ./build
|
|
patchShebangs scripts/
|
|
substituteInPlace INSTALL.im \
|
|
--replace-fail "/usr" "$out"
|
|
substituteInPlace macros/rawmacros/startdoc.pl \
|
|
--replace-fail "/usr/bin/perl" "${lib.getExe perl}"
|
|
substituteInPlace scripts/yodl2whatever.in \
|
|
--replace-fail "getopt" "${lib.getExe' util-linux "getopt"}"
|
|
substituteInPlace icmake/stdcpp \
|
|
--replace-fail "printf << \" \" << file << '\n';" 'printf(" " + file + "\n");'
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
icmake
|
|
perl
|
|
bash
|
|
];
|
|
|
|
# Set TERM because icmbuild calls tput.
|
|
env.TERM = "xterm";
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
|
|
CXXFLAGS+=' --std=c++20'
|
|
export CXXFLAGS
|
|
./build programs
|
|
./build macros
|
|
./build man
|
|
./build html
|
|
|
|
runHook postBuild
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
./build install programs
|
|
./build install macros
|
|
./build install man
|
|
# dangling symlinks
|
|
rm $out/share/man/man1/yodl2xml.1
|
|
rm $out/share/man/man1/yodl2txt.1
|
|
rm $out/share/man/man1/yodl2man.1
|
|
rm $out/share/man/man1/yodl2latex.1
|
|
rm $out/share/man/man1/yodl2html.1
|
|
rm $out/share/man/man1/yodl2whatever.1
|
|
./build install manual
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
nativeInstallCheckInputs = [
|
|
versionCheckHook
|
|
];
|
|
versionCheckProgramArg = "--version";
|
|
doInstallCheck = true;
|
|
|
|
meta = {
|
|
changelog = "https://gitlab.com/fbb-git/yodl/-/blob/${finalAttrs.src.tag}/yodl/changelog";
|
|
description = "Package that implements a pre-document language and tools to process it";
|
|
homepage = "https://fbb-git.gitlab.io/yodl/";
|
|
mainProgram = "yodl";
|
|
license = lib.licenses.agpl3Plus;
|
|
maintainers = with lib.maintainers; [ pSub ];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
})
|