robodoc: fix build on darwin, adopt (#457949)

This commit is contained in:
Aleksana 2025-11-09 02:05:57 +00:00 committed by GitHub
commit c148fa0cf6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,6 +2,7 @@
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
autoreconfHook,
}:
@ -12,20 +13,28 @@ stdenv.mkDerivation (finalAttrs: {
src = fetchFromGitHub {
owner = "gumpu";
repo = "ROBODoc";
rev = "v${finalAttrs.version}";
tag = "v${finalAttrs.version}";
hash = "sha256-l3prSdaGhOvXmZfCPbsZJNocO7y20zJjLQpajRTJOqE=";
};
patches = [
(fetchpatch {
name = "troff_generator-fix";
url = "https://github.com/gumpu/ROBODoc/commit/0f8b35c42523810415bec70bb2200d2ecb41c82f.patch?index=full";
hash = "sha256-Pbuc1gHrOeHbR4QT/dZ8wP+vqYQlilayjCGKOJP5wvk=";
})
];
postConfigure = lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace Docs/makefile.am \
--replace 'man1_MANS = robodoc.1 robohdrs.1' 'man1_MANS ='
--replace-fail 'man1_MANS = robodoc.1 robohdrs.1' 'man1_MANS ='
'';
nativeBuildInputs = [ autoreconfHook ];
hardeningDisable = [ "format" ];
meta = with lib; {
meta = {
homepage = "https://github.com/gumpu/ROBODoc";
description = "Documentation Extraction Tool";
longDescription = ''
@ -47,8 +56,9 @@ stdenv.mkDerivation (finalAttrs: {
Shell Scripts, Assembler, COBOL, Occam, Postscript, Forth, Tcl/Tk, C++,
Java -- basically any program in which you can use remarks/comments.
'';
license = with licenses; gpl3Plus;
maintainers = [ ];
platforms = platforms.all;
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ iedame ];
platforms = lib.platforms.all;
mainProgram = "robodoc";
};
})