diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-06-01 21:29:47 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-06-04 14:54:50 +0200 |
commit | 5d8fe045b6376851c33a1c772cfe46882411cd21 (patch) | |
tree | 6f80e10e2ec11cfed92207ef87082a4ae3e1666e /pkgs/development/libraries | |
parent | 17b6a597fb36063e4832983d3470ce695f809b31 (diff) |
Revert "Refactor mkFlag out of old packages"
This reverts commit 3117e0c897522ec8431572de12449f676cc8c8be. Conflicts: pkgs/development/libraries/wayland/default.nix pkgs/servers/samba/4.x.nix
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r-- | pkgs/development/libraries/lame/default.nix | 25 | ||||
-rw-r--r-- | pkgs/development/libraries/libass/default.nix | 14 | ||||
-rw-r--r-- | pkgs/development/libraries/libinput/default.nix | 10 | ||||
-rw-r--r-- | pkgs/development/libraries/libwebp/default.nix | 30 | ||||
-rw-r--r-- | pkgs/development/libraries/stxxl/default.nix | 6 |
5 files changed, 50 insertions, 35 deletions
diff --git a/pkgs/development/libraries/lame/default.nix b/pkgs/development/libraries/lame/default.nix index 4a61d188ef698..562e292791ab9 100644 --- a/pkgs/development/libraries/lame/default.nix +++ b/pkgs/development/libraries/lame/default.nix @@ -17,7 +17,7 @@ assert sndfileFileIOSupport -> (libsndfile != null); #assert mp3xSupport -> (analyzerHooksSupport && (gtk1 != null)); let - sndfileFileIO = if sndfileFileIOSupport then "sndfile" else "lame"; + mkFlag = optSet: flag: if optSet then "--enable-${flag}" else "--disable-${flag}"; in with stdenv.lib; @@ -39,18 +39,17 @@ stdenv.mkDerivation rec { ++ optional sndfileFileIOSupport libsndfile; configureFlags = [ - (mkEnable nasmSupport "nasm" null) - (mkEnable cpmlSupport "cpml" null) - #(mkEnable efenceSupport "efence" null) - (mkWith true "fileio" sndfileFileIO) - (mkEnable analyzerHooksSupport "analyzer-hooks" null) - (mkEnable decoderSupport "decoder" null) - (mkEnable frontendSupport "frontend" null) - (mkEnable frontendSupport "dynamic-frontends" null) - #(mkEnable mp3xSupport "mp3x" null) - (mkEnable mp3rtpSupport "mp3rtp" null) - ] ++ optional debugSupport [ - (mkEnable true "debug" "alot") + (mkFlag nasmSupport "nasm") + (mkFlag cpmlSupport "cpml") + #(mkFlag efenceSupport "efence") + (if sndfileFileIOSupport then "--with-fileio=sndfile" else "--with-fileio=lame") + (mkFlag analyzerHooksSupport "analyzer-hooks") + (mkFlag decoderSupport "decoder") + (mkFlag frontendSupport "frontend") + (mkFlag frontendSupport "dynamic-frontends") + #(mkFlag mp3xSupport "mp3x") + (mkFlag mp3rtpSupport "mp3rtp") + (if debugSupport then "--enable-debug=alot" else "") ]; meta = { diff --git a/pkgs/development/libraries/libass/default.nix b/pkgs/development/libraries/libass/default.nix index 502f95dca9a40..ab300729accfc 100644 --- a/pkgs/development/libraries/libass/default.nix +++ b/pkgs/development/libraries/libass/default.nix @@ -11,6 +11,10 @@ assert encaSupport -> enca != null; assert fontconfigSupport -> fontconfig != null; assert harfbuzzSupport -> harfbuzz != null; +let + mkFlag = optSet: flag: if optSet then "--enable-${flag}" else "--disable-${flag}"; +in + with stdenv.lib; stdenv.mkDerivation rec { name = "libass-${version}"; @@ -22,11 +26,11 @@ stdenv.mkDerivation rec { }; configureFlags = [ - (mkEnable encaSupport "enca" null) - (mkEnable fontconfigSupport "fontconfig" null) - (mkEnable harfbuzzSupport "harfbuzz" null) - (mkEnable rasterizerSupport "rasterizer" null) - (mkEnable largeTilesSupport "large-tiles" null) + (mkFlag encaSupport "enca") + (mkFlag fontconfigSupport "fontconfig") + (mkFlag harfbuzzSupport "harfbuzz") + (mkFlag rasterizerSupport "rasterizer") + (mkFlag largeTilesSupport "large-tiles") ]; nativeBuildInputs = [ pkgconfig yasm ]; diff --git a/pkgs/development/libraries/libinput/default.nix b/pkgs/development/libraries/libinput/default.nix index 3b8b7565e7797..87d8154e5aa4c 100644 --- a/pkgs/development/libraries/libinput/default.nix +++ b/pkgs/development/libraries/libinput/default.nix @@ -9,6 +9,10 @@ assert documentationSupport -> doxygen != null && graphviz != null; assert eventGUISupport -> cairo != null && glib != null && gtk3 != null; assert testsSupport -> check != null && valgrind != null; +let + mkFlag = optSet: flag: if optSet then "--enable-${flag}" else "--disable-${flag}"; +in + with stdenv.lib; stdenv.mkDerivation rec { name = "libinput-0.15.0"; @@ -19,9 +23,9 @@ stdenv.mkDerivation rec { }; configureFlags = [ - (mkEnable documentationSupport "documentation" null) - (mkEnable eventGUISupport "event-gui" null) - (mkEnable testsSupport "tests" null) + (mkFlag documentationSupport "documentation") + (mkFlag eventGUISupport "event-gui") + (mkFlag testsSupport "tests") ]; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/development/libraries/libwebp/default.nix b/pkgs/development/libraries/libwebp/default.nix index 871dff0aa8afd..6da1b00ee81f2 100644 --- a/pkgs/development/libraries/libwebp/default.nix +++ b/pkgs/development/libraries/libwebp/default.nix @@ -20,6 +20,10 @@ assert jpegSupport -> (libjpeg != null); assert tiffSupport -> (libtiff != null); assert gifSupport -> (giflib != null); +let + mkFlag = optSet: flag: if optSet then "--enable-${flag}" else "--disable-${flag}"; +in + with stdenv.lib; stdenv.mkDerivation rec { name = "libwebp-${version}"; @@ -31,19 +35,19 @@ stdenv.mkDerivation rec { }; configureFlags = [ - (mkEnable threadingSupport "threading" null) - (mkEnable openglSupport "gl" null) - (mkEnable pngSupport "png" null) - (mkEnable jpegSupport "jpeg" null) - (mkEnable tiffSupport "tiff" null) - (mkEnable gifSupport "gif" null) - #(mkEnable (wicSupport && stdenv.isCygwin) "wic" null) - (mkEnable alignedSupport "aligned" null) - (mkEnable swap16bitcspSupport "swap-16bit-csp" null) - (mkEnable experimentalSupport "experimental" null) - (mkEnable libwebpmuxSupport "libwebpmux" null) - (mkEnable libwebpdemuxSupport "libwebpdemux" null) - (mkEnable libwebpdecoderSupport "libwebpdecoder" null) + (mkFlag threadingSupport "threading") + (mkFlag openglSupport "gl") + (mkFlag pngSupport "png") + (mkFlag jpegSupport "jpeg") + (mkFlag tiffSupport "tiff") + (mkFlag gifSupport "gif") + #(mkFlag (wicSupport && stdenv.isCygwin) "wic") + (mkFlag alignedSupport "aligned") + (mkFlag swap16bitcspSupport "swap-16bit-csp") + (mkFlag experimentalSupport "experimental") + (mkFlag libwebpmuxSupport "libwebpmux") + (mkFlag libwebpdemuxSupport "libwebpdemux") + (mkFlag libwebpdecoderSupport "libwebpdecoder") ]; buildInputs = [ ] diff --git a/pkgs/development/libraries/stxxl/default.nix b/pkgs/development/libraries/stxxl/default.nix index 9ebd27e827717..9fb25aa36e0a6 100644 --- a/pkgs/development/libraries/stxxl/default.nix +++ b/pkgs/development/libraries/stxxl/default.nix @@ -2,6 +2,10 @@ , parallel ? true }: +let + mkFlag = optset: flag: if optset then "-D${flag}=ON" else "-D${flag}=OFF"; +in + stdenv.mkDerivation rec { name = "stxxl-${version}"; version = "1.4.1"; @@ -17,7 +21,7 @@ stdenv.mkDerivation rec { "-DBUILD_SHARED_LIBS=ON" "-DBUILD_STATIC_LIBS=OFF" "-DCMAKE_BUILD_TYPE=Release" - "-DUSE_GNU_PARALLEL=${if parallel then "ON" else "OFF"}" + (mkFlag parallel "USE_GNU_PARALLEL") ]; passthru = { |