depot/third_party/nixpkgs/pkgs/development/tools/misc/yodl/default.nix
Default email 673ac0291b Project import generated by Copybara.
GitOrigin-RevId: 1f77a4c8c74bbe896053994836790aa9bf6dc5ba
2021-03-16 10:55:35 +01:00

52 lines
1.2 KiB
Nix

{ lib, stdenv, fetchFromGitLab, perl, icmake, util-linux }:
stdenv.mkDerivation rec {
pname = "yodl";
version = "4.03.02";
nativeBuildInputs = [ icmake ];
buildInputs = [ perl ];
src = fetchFromGitLab {
sha256 = "sha256-ZxiF9He0JgqhbnQS2pE7Y85sED8avbdwGuVmFN8/XgE=";
rev = version;
repo = "yodl";
owner = "fbb-git";
};
setSourceRoot = ''
sourceRoot=$(echo */yodl)
'';
preConfigure = ''
patchShebangs ./build
patchShebangs scripts/
substituteInPlace INSTALL.im --replace /usr $out
substituteInPlace macros/rawmacros/startdoc.pl --replace /usr/bin/perl ${perl}/bin/perl
substituteInPlace scripts/yodl2whatever.in --replace getopt ${util-linux}/bin/getopt
'';
# Set TERM because icmbuild calls tput.
TERM = "xterm";
buildPhase = ''
./build programs
./build macros
./build man
'';
installPhase = ''
./build install programs
./build install macros
./build install man
'';
meta = with lib; {
description = "A package that implements a pre-document language and tools to process it";
homepage = "https://fbb-git.gitlab.io/yodl/";
license = licenses.gpl3;
maintainers = with maintainers; [ pSub ];
platforms = platforms.linux;
};
}