From 2fe5f5eada106d67d0c33f96fbc26c490f13d894 Mon Sep 17 00:00:00 2001 From: Rok Garbas Date: Sat, 28 Feb 2015 02:34:18 +0100 Subject: [PATCH] weechat: extending expression with extraBuildInputs make it easily possible to extend current buildInputs using override function. eg.: weechat.override { extraBuildInputs = [ pythonPackages.pync ]; } i've removed pync since its plugin dependency which can now be added via extraBuildInputs. --- .../networking/irc/weechat/default.nix | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/networking/irc/weechat/default.nix b/pkgs/applications/networking/irc/weechat/default.nix index 3739d098acc9..d5cc3fb7718f 100644 --- a/pkgs/applications/networking/irc/weechat/default.nix +++ b/pkgs/applications/networking/irc/weechat/default.nix @@ -1,6 +1,7 @@ { stdenv, fetchurl, ncurses, openssl, perl, python, aspell, gnutls , zlib, curl , pkgconfig, libgcrypt, ruby, lua5, tcl, guile -, pythonPackages, cacert, cmake, makeWrapper }: +, pythonPackages, cacert, cmake, makeWrapper +, extraBuildInputs ? [] }: stdenv.mkDerivation rec { version = "1.1.1"; @@ -15,18 +16,15 @@ stdenv.mkDerivation rec { [ ncurses perl python openssl aspell gnutls zlib curl pkgconfig libgcrypt ruby lua5 tcl guile pythonPackages.pycrypto makeWrapper cacert cmake ] - ++ stdenv.lib.optional stdenv.isDarwin pythonPackages.pync; + ++ extraBuildInputs; - NIX_CFLAGS_COMPILE = "-I${python}/include/${python.libPrefix}"; + NIX_CFLAGS_COMPILE = "-I${python}/include/${python.libPrefix} -DCA_FILE=${cacert}/etc/ca-bundle.crt"; postInstall = '' NIX_PYTHONPATH="$out/lib/${python.libPrefix}/site-packages" - '' + stdenv.lib.optionalString stdenv.isDarwin '' - NIX_PYTHONPATH+="${pythonPackages.pync}/lib/${python.libPrefix}/site-packages" - '' + '' - wrapProgram "$out/bin/weechat" \ - --prefix PYTHONPATH : "$PYTHONPATH" \ - --prefix PYTHONPATH : "$NIX_PYTHONPATH" + wrapProgram "$out/bin/weechat" \ + --prefix PYTHONPATH : "$PYTHONPATH" \ + --prefix PYTHONPATH : "$NIX_PYTHONPATH" ''; meta = {