@ -15,7 +15,8 @@
, perlPackages
, pythonBindings ? true
, tclBindings ? true
, perlBindings ? true
, perlBindings ? stdenv . buildPlatform == stdenv . hostPlatform
, buildPackages
} :
stdenv . mkDerivation rec {
@ -27,11 +28,15 @@ stdenv.mkDerivation rec {
sha256 = " 1 0 7 8 8 m g r h b c 5 7 z p z a k c x v 5 a q n r 2 8 1 9 p c s h m l 6 f b h 8 z v n k j a 5 6 2 y 9 " ;
} ;
strictDeps = true ;
depsBuildBuild = [ buildPackages . stdenv . cc ] ;
nativeBuildInputs = [
swig
pkg-config
libtool
] ;
] ++ lib . optionals pythonBindings [ python3 ]
++ lib . optionals tclBindings [ tcl ]
++ lib . optionals perlBindings [ perl ] ;
buildInputs = [
gd
@ -39,10 +44,12 @@ stdenv.mkDerivation rec {
libusb-compat-0_1
boost
] ++ lib . optionals pythonBindings [ python3 ncurses ]
++ lib . optionals tclBindings [ tcl ]
++ lib . optionals perlBindings [ perl perlPackages . ExtUtilsMakeMaker ] ;
++ lib . optionals tclBindings [ tcl ] ;
configureFlags = lib . optionals perlBindings [ " - - w i t h - p e r l - b i n d i n g " ]
configureFlags = [
" C C _ F O R _ B U I L D = ${ stdenv . cc . targetPrefix } c c "
] ++ lib . optionals perlBindings [ " - - w i t h - p e r l - b i n d i n g " ]
++ lib . optionals tclBindings [ " - - w i t h - t c l - b i n d i n g " " - - w i t h - t c l = ${ tcl } / l i b / " ]
++ lib . optionals pythonBindings [ " - - w i t h - p y t h o n - b i n d i n g " ] ;