From 912637f33a48f8b5bee1656b11650300770a1ae6 Mon Sep 17 00:00:00 2001 From: "Yury G. Kudryashov" <urkud.urkud@gmail.com> Date: Tue, 7 Feb 2012 21:03:25 +0000 Subject: [PATCH] Enable/disable libreoffice build in nixpkgs.config, not in tree. I've tried to use override instead of getConfig but failed because exception is thrown before the function is called with force = true. svn path=/nixpkgs/trunk/; revision=32131 --- pkgs/applications/office/openoffice/libreoffice.nix | 7 +++++-- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/office/openoffice/libreoffice.nix b/pkgs/applications/office/openoffice/libreoffice.nix index 5fde0cfa285..d90beecd967 100644 --- a/pkgs/applications/office/openoffice/libreoffice.nix +++ b/pkgs/applications/office/openoffice/libreoffice.nix @@ -6,10 +6,13 @@ , libXinerama, openssl, gperf, cppunit, GConf, ORBit2 , autoconf, openldap, postgresql, bash , langs ? [ "en-US" "ca" "ru" "eo" "fr" "nl" "de" "en-GB" ] +, force ? false }: -throw "The expression for libreoffice is still not ready" - +if !force then + throw ''The expression for libreoffice is still not ready. + Set config.libreoffice.force = true; if you want to try it anyway.'' +else stdenv.mkDerivation rec { name = "libreoffice-3.4.5.2"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b2a8a72d77d..06c4a8ee08c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7157,6 +7157,7 @@ let libreoffice = callPackage ../applications/office/openoffice/libreoffice.nix { inherit (perlPackages) ArchiveZip CompressZlib; inherit (gnome) GConf ORBit2; + force = getConfig [ "libreoffice" "force" ] false; }; lingot = callPackage ../applications/audio/lingot {