tree-wide: various cleanups

It's mainly refactoring and mass-rebuild simplifications without any
real impact (besides better readability).
This commit is contained in:
Vladimír Čunát 2015-12-30 09:54:36 +01:00
parent 072da541de
commit 1878ac9335
8 changed files with 26 additions and 26 deletions

View File

@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
patches = [ ./CVE-2015-1283.patch ]; patches = [ ./CVE-2015-1283.patch ];
configureFlags = stdenv.lib.optionalString stdenv.isFreeBSD "--with-pic"; configureFlags = stdenv.lib.optional stdenv.isFreeBSD "--with-pic";
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = http://www.libexpat.org/; homepage = http://www.libexpat.org/;

View File

@ -23,7 +23,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook pkgconfig python perl yacc flex ] nativeBuildInputs = [ autoreconfHook pkgconfig python perl yacc flex ]
++ (with perlPackages; [ JSON ]) ++ (with perlPackages; [ JSON ])
++ optional (!libOnly) texinfo; ++ optional (!libOnly) texinfo;
buildInputs = (if (!stdenv.isFreeBSD) then [ libcap_ng db ] else []) ++ [ sqlite openssl libedit ] buildInputs = optionals (!stdenv.isFreeBSD) [ libcap_ng db ]
++ [ sqlite openssl libedit ]
++ optionals (!libOnly) [ openldap pam ]; ++ optionals (!libOnly) [ openldap pam ];
## ugly, X should be made an option ## ugly, X should be made an option

View File

@ -18,11 +18,11 @@ stdenv.mkDerivation rec {
sha256 = "1sgr61cnkgc5xazijaww6wpn5fnxl9vyj9ixk3r3y7ikv3x0gnyf"; sha256 = "1sgr61cnkgc5xazijaww6wpn5fnxl9vyj9ixk3r3y7ikv3x0gnyf";
}; };
configureFlags = stdenv.lib.optionalString stdenv.isFreeBSD ''WARN_CFLAGS=""''; configureFlags = optional stdenv.isFreeBSD ''WARN_CFLAGS=""'';
nativeBuildInputs = [ pkgconfig perl yacc ] nativeBuildInputs = [ pkgconfig perl yacc ]
# Provides the mig command used by the build scripts # Provides the mig command used by the build scripts
++ stdenv.lib.optional stdenv.isDarwin bootstrap_cmds; ++ optional stdenv.isDarwin bootstrap_cmds;
buildInputs = [ openssl ] buildInputs = [ openssl ]
++ optionals (!libOnly) [ openldap libedit ]; ++ optionals (!libOnly) [ openldap libedit ];

View File

@ -11,23 +11,21 @@ stdenv.mkDerivation rec {
# Have `configure' avoid `/usr/bin/nroff' in non-chroot builds. # Have `configure' avoid `/usr/bin/nroff' in non-chroot builds.
NROFF = "${groff}/bin/nroff"; NROFF = "${groff}/bin/nroff";
patches = if stdenv.isCygwin then [ patches = [ ./01-cygwin.patch ./freebsd-wchar.patch ];
./01-cygwin.patch
] else [ ] ++ [ ./freebsd-wchar.patch ]; propagatedBuildInputs = [ ncurses ];
configureFlags = [ "--enable-widec" ];
postInstall = '' postInstall = ''
find $out/lib -type f | grep '\.\(la\|pc\)''$' | xargs sed -i \ find $out/lib -type f | grep '\.\(la\|pc\)''$' | xargs sed -i \
-e 's,-lncurses[a-z]*,-L${ncurses}/lib -lncursesw,g' -e 's,-lncurses[a-z]*,-L${ncurses}/lib -lncursesw,g'
''; '';
configureFlags = [ "--enable-widec" ];
propagatedBuildInputs = [ ncurses ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = "http://www.thrysoee.dk/editline/"; homepage = "http://www.thrysoee.dk/editline/";
description = "A port of the NetBSD Editline library (libedit)"; description = "A port of the NetBSD Editline library (libedit)";
license = licenses.bsd3; license = licenses.bsd3;
platforms = platforms.all; platforms = platforms.all;
}; };
} }

View File

@ -1,4 +1,4 @@
{ fetchurl, stdenv }: { fetchurl, stdenv, lib }:
assert (!stdenv.isLinux); assert (!stdenv.isLinux);
@ -10,17 +10,18 @@ stdenv.mkDerivation rec {
sha256 = "04q6lgl3kglmmhw59igq1n7v3rp1rpkypl366cy1k1yn2znlvckj"; sha256 = "04q6lgl3kglmmhw59igq1n7v3rp1rpkypl366cy1k1yn2znlvckj";
}; };
patches = if stdenv.isCygwin then [ patches = lib.optionals stdenv.isCygwin [
./libiconv-1.14-reloc.patch ./libiconv-1.14-reloc.patch
./libiconv-1.14-wchar.patch ./libiconv-1.14-wchar.patch
] else null; ];
configureFlags =
# On Cygwin, Libtool produces a `.dll.a', which is not a "real" DLL # 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 # (Windows' linker would need to be used somehow to produce an actual
# DLL.) Thus, build the static library too, and this is what Gettext # DLL.) Thus, build the static library too, and this is what Gettext
# will actually use. # will actually use.
configureFlags = if stdenv.isCygwin then [ "--enable-static" ] else lib.optional stdenv.isCygwin "--enable-static"
if stdenv.isFreeBSD then [ "--with-pic" ] else null; ++ lib.optional stdenv.isFreeBSD "--with-pic";
crossAttrs = { crossAttrs = {
# Disable stripping to avoid "libiconv.a: Archive has no index" (MinGW). # 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/; homepage = http://www.gnu.org/software/libiconv/;
license = stdenv.lib.licenses.lgpl2Plus; license = lib.licenses.lgpl2Plus;
maintainers = [ ]; maintainers = [ ];
# This library is not needed on GNU platforms. # 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;
}; };
} }

View File

@ -10,7 +10,7 @@ stdenv.mkDerivation {
sha256= "11a615225baa5f8bb686824423f50e4427acd3f70d394765bdff32801f0fd5b0"; sha256= "11a615225baa5f8bb686824423f50e4427acd3f70d394765bdff32801f0fd5b0";
}; };
configureFlags = stdenv.lib.optionalString stdenv.isFreeBSD "--with-pic"; configureFlags = stdenv.lib.optional stdenv.isFreeBSD "--with-pic";
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = http://www.ossp.org/pkg/lib/uuid/; homepage = http://www.ossp.org/pkg/lib/uuid/;

View File

@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
name = "${name}.tar.gz"; name = "${name}.tar.gz";
}; };
patches = stdenv.lib.optional stdenv.isFreeBSD [ ./freebsd.patch ]; patches = stdenv.lib.optional stdenv.isFreeBSD ./freebsd.patch;
doCheck = !stdenv.isFreeBSD; doCheck = !stdenv.isFreeBSD;
@ -20,6 +20,6 @@ stdenv.mkDerivation rec {
inherit version; inherit version;
homepage = http://miniupnp.free.fr/; homepage = http://miniupnp.free.fr/;
description = "A client that implements the UPnP Internet Gateway Device (IGD) specification"; description = "A client that implements the UPnP Internet Gateway Device (IGD) specification";
platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.freebsd; platforms = with stdenv.lib.platforms; linux ++ freebsd;
}; };
} }

View File

@ -6339,7 +6339,7 @@ let self = _self // overrides; _self = with self; {
LocaleGettext = buildPerlPackage { LocaleGettext = buildPerlPackage {
name = "LocaleGettext-1.05"; name = "LocaleGettext-1.05";
buildInputs = stdenv.lib.optional (stdenv.isFreeBSD || stdenv.isDarwin || stdenv.isCygwin) pkgs.gettext; buildInputs = stdenv.lib.optional (stdenv.isFreeBSD || stdenv.isDarwin || stdenv.isCygwin) pkgs.gettext;
NIX_CFLAGS_LINK = if (stdenv.isFreeBSD || stdenv.isDarwin || stdenv.isCygwin) then "-lintl" else null; NIX_CFLAGS_LINK = stdenv.lib.optional (stdenv.isFreeBSD || stdenv.isDarwin || stdenv.isCygwin) "-lintl";
src = fetchurl { src = fetchurl {
url = mirror://cpan/authors/id/P/PV/PVANDRY/gettext-1.05.tar.gz; url = mirror://cpan/authors/id/P/PV/PVANDRY/gettext-1.05.tar.gz;
sha256 = "15262a00vx714szpx8p2z52wxkz46xp7acl72znwjydyq4ypydi7"; sha256 = "15262a00vx714szpx8p2z52wxkz46xp7acl72znwjydyq4ypydi7";
@ -6552,10 +6552,10 @@ let self = _self // overrides; _self = with self; {
}; };
patches = [ ../development/perl-modules/lwp-test-with-localhost.patch ]; patches = [ ../development/perl-modules/lwp-test-with-localhost.patch ];
propagatedBuildInputs = [ EncodeLocale FileListing HTMLParser HTTPCookies HTTPDaemon HTTPDate HTTPMessage HTTPNegotiate LWPMediaTypes NetHTTP URI WWWRobotRules ]; propagatedBuildInputs = [ EncodeLocale FileListing HTMLParser HTTPCookies HTTPDaemon HTTPDate HTTPMessage HTTPNegotiate LWPMediaTypes NetHTTP URI WWWRobotRules ];
meta = { meta = with stdenv.lib; {
description = "The World-Wide Web library for Perl"; description = "The World-Wide Web library for Perl";
license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; license = with licenses; [ artistic1 gpl1Plus ];
platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin ++ stdenv.lib.platforms.illumos ++ stdenv.lib.platforms.freebsd; platforms = platforms.unix;
}; };
}; };