about summary refs log tree commit diff
path: root/pkgs/development/libraries/libiconv/default.nix
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2015-12-30 09:54:36 +0100
committerVladimír Čunát <vcunat@gmail.com>2016-01-02 11:29:45 +0100
commit1878ac9335e86631a92320ca0c3894f56b278a95 (patch)
tree63008f465d634b4195e624ca626a2e9381237f50 /pkgs/development/libraries/libiconv/default.nix
parent072da541de9a00837fc4e21c2bf4a967b4d63713 (diff)
tree-wide: various cleanups
It's mainly refactoring and mass-rebuild simplifications without any
real impact (besides better readability).
Diffstat (limited to 'pkgs/development/libraries/libiconv/default.nix')
-rw-r--r--pkgs/development/libraries/libiconv/default.nix15
1 files changed, 8 insertions, 7 deletions
diff --git a/pkgs/development/libraries/libiconv/default.nix b/pkgs/development/libraries/libiconv/default.nix
index 24a0376f0f9f7..f5818c3bf4c90 100644
--- a/pkgs/development/libraries/libiconv/default.nix
+++ b/pkgs/development/libraries/libiconv/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, stdenv }:
+{ fetchurl, stdenv, lib }:
 
 assert (!stdenv.isLinux);
 
@@ -10,17 +10,18 @@ stdenv.mkDerivation rec {
     sha256 = "04q6lgl3kglmmhw59igq1n7v3rp1rpkypl366cy1k1yn2znlvckj";
   };
 
-  patches = if stdenv.isCygwin then [
+  patches = lib.optionals stdenv.isCygwin [
     ./libiconv-1.14-reloc.patch
     ./libiconv-1.14-wchar.patch
-  ] else null;
+  ];
 
+  configureFlags =
   # On Cygwin, Libtool produces a `.dll.a', which is not a "real" DLL
   # (Windows' linker would need to be used somehow to produce an actual
   # DLL.)  Thus, build the static library too, and this is what Gettext
   # will actually use.
-  configureFlags = if stdenv.isCygwin then [ "--enable-static" ] else
-                   if stdenv.isFreeBSD then [ "--with-pic" ] else null;
+    lib.optional stdenv.isCygwin "--enable-static"
+    ++ lib.optional stdenv.isFreeBSD "--with-pic";
 
   crossAttrs = {
     # Disable stripping to avoid "libiconv.a: Archive has no index" (MinGW).
@@ -42,11 +43,11 @@ stdenv.mkDerivation rec {
     '';
 
     homepage = http://www.gnu.org/software/libiconv/;
-    license = stdenv.lib.licenses.lgpl2Plus;
+    license = lib.licenses.lgpl2Plus;
 
     maintainers = [ ];
 
     # This library is not needed on GNU platforms.
-    hydraPlatforms = stdenv.lib.platforms.cygwin ++ stdenv.lib.platforms.darwin ++ stdenv.lib.platforms.freebsd;
+    hydraPlatforms = with lib.platforms; cygwin ++ darwin ++ freebsd;
   };
 }