Unverified Commit d8e8273d authored by Michael Glass's avatar Michael Glass
Browse files

mydumper: copy pre-built docs instead of building them

parent eda22858
Loading
Loading
Loading
Loading
+7 −14
Original line number Diff line number Diff line
@@ -3,9 +3,8 @@
  stdenv,
  fetchFromGitHub,
  cmake,
  installShellFiles,
  pkg-config,
  sphinx,
  python3Packages,
  glib,
  pcre,
  pcre2,
@@ -45,11 +44,7 @@ stdenv.mkDerivation rec {
  nativeBuildInputs = [
    cmake
    pkg-config
    # for docs
    sphinx
    python3Packages.furo
    python3Packages.sphinx-copybutton
    python3Packages.sphinx-inline-tabs
    installShellFiles
  ];

  nativeInstallCheckInputs = [ versionCheckHook ];
@@ -73,7 +68,6 @@ stdenv.mkDerivation rec {
    ];

  cmakeFlags = [
    "-DBUILD_DOCS=ON"
    "-DCMAKE_SKIP_BUILD_RPATH=ON"
    "-DMYSQL_INCLUDE_DIR=${lib.getDev libmysqlclient}/include/mysql"
  ];
@@ -92,14 +86,13 @@ stdenv.mkDerivation rec {
    # as of mydumper v0.14.5-1, mydumper tries to install its config to /etc
    substituteInPlace CMakeLists.txt\
      --replace-fail "/etc" "$out/etc"

    # as of mydumper v0.16.5-1, mydumper disables building docs by default
    substituteInPlace CMakeLists.txt\
        --replace-fail "#  add_subdirectory(docs)" "add_subdirectory(docs)"
  '';

  preBuild = ''
    cp -r $src/docs/images ./docs
  # copy man files & docs over
  postInstall = ''
    installManPage $src/docs/man/*
    mkdir -p $doc/share/doc/mydumper
    cp -r $src/docs/html/* $doc/share/doc/mydumper
  '';

  passthru.updateScript = nix-update-script {