Commit 813ee96b authored by Petr Zahradnik's avatar Petr Zahradnik
Browse files

pod2mdoc: 0.0.10 -> 0.2, fix non-BSD build

parent 4ac13950
Loading
Loading
Loading
Loading
+17 −10
Original line number Diff line number Diff line
@@ -4,15 +4,20 @@
  fetchurl,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "pod2mdoc";
  version = "0.0.10";
  version = "0.2";

  src = fetchurl {
    url = "http://mdocml.bsd.lv/pod2mdoc/snapshots/pod2mdoc-${version}.tgz";
    sha256 = "0nwa9zv9gmfi5ysz1wfm60kahc7nv0133n3dfc2vh2y3gj8mxr4f";
    url = "http://mdocml.bsd.lv/pod2mdoc/snapshots/pod2mdoc-${finalAttrs.version}.tgz";
    hash = "sha256-dPH+MfYdyHauClcD7N1zwjw4EPdtt9uQGCUh9OomsPw=";
  };

  # use compat_ohash instead of system ohash, which is BSD-specific
  postPatch = ''
    substituteInPlace Makefile --replace-fail "-DHAVE_OHASH=1" "-DHAVE_OHASH=0"
  '';

  installPhase = ''
    mkdir -p $out/bin
    mkdir -p $out/share/man/man1
@@ -20,12 +25,14 @@ stdenv.mkDerivation rec {
    install -m 0444 pod2mdoc.1 $out/share/man/man1
  '';

  meta = with lib; {
    homepage = "http://mdocml.bsd.lv/";
  enableParallelBuild = true;

  meta = {
    homepage = "https://mandoc.bsd.lv/pod2mdoc/";
    description = "converter from POD into mdoc";
    license = licenses.isc;
    platforms = platforms.all;
    maintainers = with maintainers; [ ramkromberg ];
    license = lib.licenses.isc;
    platforms = lib.platforms.all;
    maintainers = with lib.maintainers; [ ramkromberg ];
    mainProgram = "pod2mdoc";
  };
}
})