From 04ae9f288d3756a5f1d03eda9651ead7e3aeec2c Mon Sep 17 00:00:00 2001 From: aszlig Date: Wed, 20 Jun 2012 10:31:54 +0200 Subject: [PATCH] chromium: Implement handling of enableCUPS. We also need to patch the compilation process, so it allows deprecated declarations when building support for the cups backend. In addition, we also need to add libgcrypt to dependencies as it's needed by the cups implementation. --- .../browsers/chromium/cups_allow_deprecated.patch | 14 ++++++++++++++ .../networking/browsers/chromium/default.nix | 9 ++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 pkgs/applications/networking/browsers/chromium/cups_allow_deprecated.patch diff --git a/pkgs/applications/networking/browsers/chromium/cups_allow_deprecated.patch b/pkgs/applications/networking/browsers/chromium/cups_allow_deprecated.patch new file mode 100644 index 00000000000..4fd6a24cc14 --- /dev/null +++ b/pkgs/applications/networking/browsers/chromium/cups_allow_deprecated.patch @@ -0,0 +1,14 @@ +diff --git a/printing/printing.gyp b/printing/printing.gyp +index 19fa1b2..f11d76e 100644 +--- a/printing/printing.gyp ++++ b/printing/printing.gyp +@@ -26,6 +26,9 @@ + 'include_dirs': [ + '..', + ], ++ 'cflags': [ ++ '-Wno-deprecated-declarations', ++ ], + 'sources': [ + 'backend/print_backend.cc', + 'backend/print_backend.h', diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix index 5a04731bc0e..f0f443d15d6 100644 --- a/pkgs/applications/networking/browsers/chromium/default.nix +++ b/pkgs/applications/networking/browsers/chromium/default.nix @@ -26,6 +26,7 @@ let enableGnomeSupport = false; gnomeKeyringSupport = false; useProprietaryCodecs = false; + enableCUPS = false; }; sourceInfo = import ./source.nix; @@ -91,13 +92,15 @@ in stdenv.mkDerivation rec { glib gtk dbus_glib libXScrnSaver libXcursor mesa ] ++ stdenv.lib.optional config.gnomeKeyringSupport libgnome_keyring - ++ stdenv.lib.optionals config.enableGnomeSupport [ gconf libgcrypt ]; + ++ stdenv.lib.optionals config.enableGnomeSupport [ gconf libgcrypt ] + ++ stdenv.lib.optional config.enableCUPS libgcrypt; opensslPatches = stdenv.lib.optional config.useOpenSSL openssl.patches; prePatch = "patchShebangs ."; - patches = stdenv.lib.optional (!config.useSELinux) ./enable_seccomp.patch; + patches = stdenv.lib.optional (!config.useSELinux) ./enable_seccomp.patch + ++ stdenv.lib.optional config.enableCUPS ./cups_allow_deprecated.patch; postPatch = stdenv.lib.optionalString config.useOpenSSL '' cat $opensslPatches | patch -p1 -d third_party/openssl/openssl @@ -113,7 +116,7 @@ in stdenv.mkDerivation rec { disable_nacl = !config.naclSupport; use_openssl = config.useOpenSSL; selinux = config.useSELinux; - use_cups = false; + use_cups = config.enableCUPS; } // stdenv.lib.optionalAttrs (stdenv.system == "x86_64-linux") { target_arch = "x64"; } // stdenv.lib.optionalAttrs (stdenv.system == "i686-linux") {