forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mydumper: 0.14.1-1 -> 0.16.9-1 (NixOS#325566)
- Loading branch information
Showing
1 changed file
with
55 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,83 @@ | ||
{ lib, stdenv, fetchFromGitHub | ||
, cmake, pkg-config, sphinx | ||
, glib , pcre | ||
, libmysqlclient, libressl | ||
, cmake, pkg-config, sphinx, python3Packages | ||
, glib, pcre, pcre2, util-linux | ||
, libsysprof-capture, libmysqlclient, libressl | ||
, zlib, zstd | ||
, libselinux, libsepol | ||
, nix-update-script, testers, versionCheckHook, mydumper | ||
}: | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "mydumper"; | ||
version = "0.14.3-1"; | ||
version = "0.16.9-1"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "mydumper"; | ||
repo = "mydumper"; | ||
owner = pname; | ||
repo = pname; | ||
rev = "refs/tags/v${version}"; | ||
hash = "sha256-qyJGnrBOElQ3s2VoOWfW1luacd33haanmzKidMBgCpc="; | ||
hash = "sha256-f/NuDyicLG0RUl/ePGYa/4B2wAZ+roVLMc+kWkNxd+Q="; | ||
# as of mydumper v0.16.5-1, mydumper extracted its docs into a submodule | ||
fetchSubmodules = true; | ||
}; | ||
|
||
outputs = [ "out" "doc" "man" ]; | ||
|
||
nativeBuildInputs = [ cmake pkg-config sphinx ]; | ||
nativeBuildInputs = [ cmake pkg-config sphinx python3Packages.furo ]; | ||
|
||
nativeInstallCheckInputs = [ versionCheckHook ]; | ||
doInstallCheck = true; | ||
|
||
buildInputs = [ | ||
glib pcre | ||
libmysqlclient libressl | ||
glib pcre pcre2 util-linux | ||
libmysqlclient libressl libsysprof-capture | ||
zlib zstd | ||
]; | ||
] ++ lib.optionals stdenv.isLinux [ libselinux libsepol ]; | ||
|
||
cmakeFlags = [ | ||
"-DBUILD_DOCS=ON" | ||
"-DCMAKE_SKIP_BUILD_RPATH=ON" | ||
"-DMYSQL_INCLUDE_DIR=${lib.getDev libmysqlclient}/include/mysql" | ||
"-DWITH_ZSTD=ON" | ||
]; | ||
|
||
env.NIX_CFLAGS_COMPILE = ( | ||
if stdenv.isDarwin then | ||
toString [ | ||
"-Wno-error=deprecated-non-prototype" | ||
"-Wno-error=format" | ||
] | ||
else | ||
"-Wno-error=maybe-uninitialized" | ||
); | ||
|
||
postPatch = '' | ||
# 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 | ||
''; | ||
|
||
passthru.updateScript = nix-update-script { }; | ||
|
||
# mydumper --version is checked in `versionCheckHook` | ||
passthru.tests = testers.testVersion { | ||
package = mydumper; | ||
command = "myloader --version"; | ||
version = "myloader v${version}"; | ||
}; | ||
|
||
meta = with lib; { | ||
description = "High-performance MySQL backup tool"; | ||
homepage = "https://github.com/maxbube/mydumper"; | ||
homepage = "https://github.com/mydumper/mydumper"; | ||
changelog = "https://github.com/mydumper/mydumper/releases/tag/v${version}"; | ||
license = licenses.gpl3Plus; | ||
platforms = platforms.linux; | ||
maintainers = with maintainers; [ izorkin ]; | ||
platforms = lib.platforms.unix; | ||
maintainers = with maintainers; [ izorkin michaelglass ]; | ||
}; | ||
} |