tree-wide: various cleanups
It's mainly refactoring and mass-rebuild simplifications without any real impact (besides better readability).
This commit is contained in:
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user