forked from mirrors/nixpkgs
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.
This commit is contained in:
parent
8371d50836
commit
04ae9f288d
|
@ -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',
|
|
@ -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") {
|
||||
|
|
Loading…
Reference in a new issue