@ -18,13 +18,6 @@ mytopEnv = perl.withPackages (p: with p; [ DataDumper DBDmysql DBI TermReadKey ]
mariadb = server // {
inherit client ; # MariaDB Client
server = server ; # MariaDB Server
inherit connector-c ; # libmysqlclient.so
inherit galera ;
} ;
galeraLibs = buildEnv {
name = " g a l e r a - l i b - i n p u t s - u n i t e d " ;
paths = [ openssl . out boost check ] ;
} ;
common = rec { # attributes common to both builds
@ -218,95 +211,4 @@ server = stdenv.mkDerivation (common // {
CXXFLAGS = optionalString stdenv . isi686 " - f p e r m i s s i v e " ;
} ) ;
connector-c = stdenv . mkDerivation rec {
pname = " m a r i a d b - c o n n e c t o r - c " ;
version = " 2 . 3 . 7 " ;
src = fetchurl {
url = " h t t p s : / / d o w n l o a d s . m a r i a d b . o r g / i n t e r s t i t i a l / c o n n e c t o r - c - ${ version } / m a r i a d b - c o n n e c t o r - c - ${ version } - s r c . t a r . g z / f r o m / h t t p % 3 A / / n y c 2 . m i r r o r s . d i g i t a l o c e a n . c o m / m a r i a d b / " ;
sha256 = " 1 3 i z i 3 5 v v x h i w l 2 d s n q r z 7 5 c i i s y 2 s 2 k 3 0 g i v 7 h r m 0 1 q l w n m i y c l " ;
name = " m a r i a d b - c o n n e c t o r - c - ${ version } - s r c . t a r . g z " ;
} ;
# outputs = [ "dev" "out" ]; FIXME: cmake variables don't allow that < 3.0
cmakeFlags = [
" - D W I T H _ E X T E R N A L _ Z L I B = O N "
" - D M Y S Q L _ U N I X _ A D D R = / r u n / m y s q l d / m y s q l d . s o c k "
] ;
# The cmake setup-hook uses $out/lib by default, this is not the case here.
preConfigure = stdenv . lib . optionalString stdenv . isDarwin ''
cmakeFlagsArray + = ( " - D C M A K E _ I N S T A L L _ N A M E _ D I R = $ o u t / l i b / m a r i a d b " )
'' ;
nativeBuildInputs = [ cmake ] ;
propagatedBuildInputs = [ openssl zlib ] ;
buildInputs = [ libiconv ] ;
enableParallelBuilding = true ;
postFixup = ''
ln - sv mariadb_config $ out/bin/mysql_config
ln - sv mariadb $ out/lib/mysql
ln - sv mariadb $ out/include/mysql
'' ;
meta = with stdenv . lib ; {
description = " C l i e n t l i b r a r y t h a t c a n b e u s e d t o c o n n e c t t o M y S Q L o r M a r i a D B " ;
license = licenses . lgpl21 ;
maintainers = with maintainers ; [ globin ] ;
platforms = platforms . all ;
} ;
} ;
galera = stdenv . mkDerivation rec {
pname = " m a r i a d b - g a l e r a " ;
version = " 2 5 . 3 . 2 6 " ;
src = fetchFromGitHub {
owner = " c o d e r s h i p " ;
repo = " g a l e r a " ;
rev = " r e l e a s e _ ${ version } " ;
sha256 = " 0 f s 0 c 1 p x 9 l k n f 1 a 5 w w b 1 2 z 1 h j 7 j 7 b 6 h s f j d d g g i k v k d k r n r 2 x s 1 f " ;
fetchSubmodules = true ;
} ;
buildInputs = [ asio boost check openssl scons ] ;
postPatch = ''
substituteInPlace SConstruct \
- - replace " b o o s t _ l i b r a r y _ p a t h = ' ' ' " " b o o s t _ l i b r a r y _ p a t h = ' ${ boost } / l i b ' "
'' ;
preConfigure = ''
export CPPFLAGS = " - I ${ asio } / i n c l u d e - I ${ boost . dev } / i n c l u d e - I ${ check } / i n c l u d e - I ${ openssl . dev } / i n c l u d e "
export LIBPATH = " ${ galeraLibs } / l i b "
'' ;
sconsFlags = " s s l = 1 s y s t e m _ a s i o = 0 s t r i c t _ b u i l d _ f l a g s = 0 " ;
installPhase = ''
# copied with modifications from scripts/packages/freebsd.sh
GALERA_LICENSE_DIR = " $ s h a r e / l i c e n s e s / ${ pname } - ${ version } "
install - d $ out / { bin , lib/galera , share/doc/galera , $ GALERA_LICENSE_DIR }
install - m 555 " g a r b / g a r b d " " $ o u t / b i n / g a r b d "
install - m 444 " l i b g a l e r a _ s m m . s o " " $ o u t / l i b / g a l e r a / l i b g a l e r a _ s m m . s o "
install - m 444 " s c r i p t s / p a c k a g e s / R E A D M E " " $ o u t / s h a r e / d o c / g a l e r a / "
install - m 444 " s c r i p t s / p a c k a g e s / R E A D M E - M y S Q L " " $ o u t / s h a r e / d o c / g a l e r a / "
install - m 444 " s c r i p t s / p a c k a g e s / f r e e b s d / L I C E N S E " " $ o u t / $ G A L E R A _ L I C E N S E _ D I R "
install - m 444 " L I C E N S E " " $ o u t / $ G A L E R A _ L I C E N S E _ D I R / G P L v 2 "
install - m 444 " a s i o / L I C E N S E _ 1 _ 0 . t x t " " $ o u t / $ G A L E R A _ L I C E N S E _ D I R / L I C E N S E . a s i o "
install - m 444 " w w w . e v a n j o n e s . c a / L I C E N S E " " $ o u t / $ G A L E R A _ L I C E N S E _ D I R / L I C E N S E . c r c 3 2 c "
install - m 444 " c h r o m i u m / L I C E N S E " " $ o u t / $ G A L E R A _ L I C E N S E _ D I R / L I C E N S E . c h r o m i u m "
'' ;
meta = {
description = " G a l e r a 3 w s r e p p r o v i d e r l i b r a r y " ;
homepage = http://galeracluster.com/ ;
license = licenses . lgpl2 ;
maintainers = with maintainers ; [ izorkin ] ;
platforms = platforms . all ;
} ;
} ;
in mariadb