diff --git a/pkgs/tools/misc/coreutils-5/default.nix b/pkgs/tools/misc/coreutils-5/default.nix
index fc9ef3b7c42..de1ff1c4a90 100644
--- a/pkgs/tools/misc/coreutils-5/default.nix
+++ b/pkgs/tools/misc/coreutils-5/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl}:
+{stdenv, fetchurl, perl ? null}:
 
 stdenv.mkDerivation {
   name = "coreutils-5.97";
diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix
index e6ca5105cbe..e967533cd74 100644
--- a/pkgs/tools/misc/coreutils/default.nix
+++ b/pkgs/tools/misc/coreutils/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, aclSupport ? false, acl}:
+{stdenv, fetchurl, aclSupport ? false, acl, perl}:
 
 stdenv.mkDerivation rec {
   name = "coreutils-8.1";
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
     sha256 = "1c68q4c4fg6x22ba2p8xb0ddn4xdl847np2g33h63bgj9pdav8ay";
   };
 
-  buildInputs = stdenv.lib.optional aclSupport acl;
+  buildInputs = [ perl ] ++ stdenv.lib.optional aclSupport acl;
 
   doCheck = true;
 
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index c12b0418d89..922511e41ba 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -514,7 +514,7 @@ let
       then import ../tools/misc/coreutils-5
       else import ../tools/misc/coreutils)
     {
-      inherit fetchurl stdenv acl;
+      inherit fetchurl stdenv acl perl;
       aclSupport = stdenv.isLinux;
     };