about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/pcre/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/pcre/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/pcre/default.nix17
1 files changed, 7 insertions, 10 deletions
diff --git a/nixpkgs/pkgs/development/libraries/pcre/default.nix b/nixpkgs/pkgs/development/libraries/pcre/default.nix
index c91d4e2bd0c2..f7094e04a9d6 100644
--- a/nixpkgs/pkgs/development/libraries/pcre/default.nix
+++ b/nixpkgs/pkgs/development/libraries/pcre/default.nix
@@ -7,17 +7,14 @@ with lib;
 
 assert elem variant [ null "cpp" "pcre16" "pcre32" ];
 
-let
+stdenv.mkDerivation rec {
+  pname = "pcre"
+    + lib.optionalString (variant == "cpp") "-cpp"
+    + lib.optionalString (variant != "cpp" && variant != null) variant;
   version = "8.44";
-  pname = if (variant == null) then "pcre"
-    else  if (variant == "cpp") then "pcre-cpp"
-    else  variant;
-
-in stdenv.mkDerivation {
-  name = "${pname}-${version}";
 
   src = fetchurl {
-    url = "https://ftp.pcre.org/pub/pcre/pcre-${version}.tar.bz2";
+    url = "mirror://sourceforge/project/pcre/pcre/${version}/pcre-${version}.tar.bz2";
     sha256 = "0v9nk51wh55pcbnf2jr36yarz8ayajn6d7ywiq2wagivn9c8c40r";
   };
 
@@ -43,8 +40,7 @@ in stdenv.mkDerivation {
 
   postFixup = ''
     moveToOutput bin/pcre-config "$dev"
-  ''
-    + optionalString (variant != null) ''
+  '' + optionalString (variant != null) ''
     ln -sf -t "$out/lib/" '${pcre.out}'/lib/libpcre{,posix}.{so.*.*.*,*dylib}
   '';
 
@@ -62,5 +58,6 @@ in stdenv.mkDerivation {
     '';
 
     platforms = platforms.all;
+    maintainers = with maintainers; [ ];
   };
 }