Unverified Commit c148fa0c authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

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

parents d78d3d99 d7c40008
Loading
Loading
Loading
Loading
+16 −6
Original line number Diff line number Diff line
@@ -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";
  };
})