diff --git a/pkgs/tools/text/enscript/default.nix b/pkgs/tools/text/enscript/default.nix index 7bb7060d5c2d..156ff7aea6b1 100644 --- a/pkgs/tools/text/enscript/default.nix +++ b/pkgs/tools/text/enscript/default.nix @@ -8,6 +8,13 @@ stdenv.mkDerivation rec { sha256 = "1fy0ymvzrrvs889zanxcaxjfcxarm2d3k43c9frmbl1ld7dblmkd"; }; + preBuild = + '' + # Fix building on Darwin with GCC. + substituteInPlace compat/regex.c --replace \ + __private_extern__ '__attribute__ ((visibility ("hidden")))' + ''; + buildInputs = [ gettext ]; doCheck = true; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index df1ac5dc24a0..cc2ab0c177c0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -949,12 +949,7 @@ let encfs = callPackage ../tools/filesystems/encfs { }; - enscript = callPackage ../tools/text/enscript { - # fix syntax errors - stdenv = if stdenv.isDarwin - then clangStdenv - else stdenv; - }; + enscript = callPackage ../tools/text/enscript { }; ethtool = callPackage ../tools/misc/ethtool { };