pcre: cleanup a little

This commit is contained in:
Nikolay Amiantov 2016-04-09 02:48:14 +03:00
parent 1e2fe7e07d
commit cdc5326a31
1 changed files with 8 additions and 9 deletions

View File

@ -14,11 +14,11 @@ let
else abort "Invalid character size"; else abort "Invalid character size";
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
name = "pcre${lib.optionalString (withCharSize != 8) (toString withCharSize)}-8.38"; name = "pcre${lib.optionalString (withCharSize != 8) (toString withCharSize)}-${version}";
# FIXME: add "version" attribute and use it in URL version = "8.38";
src = fetchurl { src = fetchurl {
url = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.bz2"; url = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-${version}.tar.bz2";
sha256 = "1pvra19ljkr5ky35y2iywjnsckrs9ch2anrf5b0dc91hw8v2vq5r"; sha256 = "1pvra19ljkr5ky35y2iywjnsckrs9ch2anrf5b0dc91hw8v2vq5r";
}; };
@ -28,12 +28,11 @@ in stdenv.mkDerivation rec {
outputs = [ "out" "doc" "man" ]; outputs = [ "out" "doc" "man" ];
# FIXME: Refactor into list! configureFlags =
configureFlags = '' [ "--enable-jit" ]
--enable-jit ++ lib.optional unicodeSupport "--enable-unicode-properties"
${lib.optionalString unicodeSupport "--enable-unicode-properties"} ++ lib.optional (!cplusplusSupport) "--disable-cpp"
${lib.optionalString (!cplusplusSupport) "--disable-cpp"} ++ charFlags;
'' + lib.optionalString (charFlags != []) " ${toString charFlags}";
doCheck = with stdenv; !(isCygwin || isFreeBSD); doCheck = with stdenv; !(isCygwin || isFreeBSD);
# XXX: test failure on Cygwin # XXX: test failure on Cygwin