Merge #2638: fix weechat build on darwin

Conflicts (trivial):
	pkgs/development/python-modules/pycrypto/default.nix
This commit is contained in:
Vladimír Čunát 2014-06-09 19:37:06 +02:00
commit 97006eb5ed
4 changed files with 58 additions and 16 deletions

View File

@ -14,8 +14,8 @@ stdenv.mkDerivation rec {
buildInputs = buildInputs =
[ ncurses perl python openssl aspell gnutls zlib curl pkgconfig [ ncurses perl python openssl aspell gnutls zlib curl pkgconfig
libgcrypt ruby lua5 tcl guile pythonPackages.pycrypto makeWrapper libgcrypt ruby lua5 tcl guile pythonPackages.pycrypto makeWrapper
cacert cmake cacert cmake ]
]; ++ stdenv.lib.optional stdenv.isDarwin pythonPackages.pync;
# This patch is based on # This patch is based on
# weechat/c324610226cef15ecfb1235113c8243b068084c8. It fixes # weechat/c324610226cef15ecfb1235113c8243b068084c8. It fixes
@ -24,17 +24,23 @@ stdenv.mkDerivation rec {
# then. # then.
patches = [ ./fix-gnutls-32.diff ]; patches = [ ./fix-gnutls-32.diff ];
NIX_CFLAGS_COMPILE = "-I${python}/include/${python.libPrefix}";
postInstall = '' postInstall = ''
wrapProgram "$out/bin/weechat" \ NIX_PYTHONPATH="$out/lib/${python.libPrefix}/site-packages"
--prefix PYTHONPATH : "$PYTHONPATH" \ '' + stdenv.lib.optionalString stdenv.isDarwin ''
--prefix PYTHONPATH : "$out/lib/${python.libPrefix}/site-packages" NIX_PYTHONPATH+="${pythonPackages.pync}/lib/${python.libPrefix}/site-packages"
'' + ''
wrapProgram "$out/bin/weechat" \
--prefix PYTHONPATH : "$PYTHONPATH" \
--prefix PYTHONPATH : "$NIX_PYTHONPATH"
''; '';
meta = { meta = {
homepage = http://www.weechat.org/; homepage = http://www.weechat.org/;
description = "A fast, light and extensible chat client"; description = "A fast, light and extensible chat client";
license = stdenv.lib.licenses.gpl3; license = stdenv.lib.licenses.gpl3;
maintainers = with stdenv.lib.maintainers; [ garbas the-kenny ]; maintainers = with stdenv.lib.maintainers; [ lovek323 garbas the-kenny ];
platforms = stdenv.lib.platforms.linux; platforms = stdenv.lib.platforms.unix;
}; };
} }

View File

@ -16,20 +16,26 @@ stdenv.mkDerivation rec {
buildInputs = buildInputs =
[ ncurses perl python openssl aspell gnutls zlib curl pkgconfig [ ncurses perl python openssl aspell gnutls zlib curl pkgconfig
libgcrypt ruby lua5 tcl guile pythonPackages.pycrypto makeWrapper libgcrypt ruby lua5 tcl guile pythonPackages.pycrypto makeWrapper
cacert cmake cacert cmake ]
]; ++ stdenv.lib.optional stdenv.isDarwin pythonPackages.pync;
NIX_CFLAGS_COMPILE = "-I${python}/include/${python.libPrefix}";
postInstall = '' postInstall = ''
wrapProgram "$out/bin/weechat" \ NIX_PYTHON_PATH="$out/lib/${python.libPrefix}/site-packages"
--prefix PYTHONPATH : "$PYTHONPATH" \ '' + stdenv.lib.optionalString stdenv.isDarwin ''
--prefix PYTHONPATH : "$out/lib/${python.libPrefix}/site-packages" NIX_PYTHON_PATH+="${pythonPackages.pync}/lib/${python.libPrefix}/site-packages"
'' + ''
wrapProgram "$out/bin/weechat" \
--prefix PYTHONPATH : "$PYTHONPATH" \
--prefix PYTHONPATH : "$NIX_PYTHONPATH"
''; '';
meta = { meta = {
homepage = http://www.weechat.org/; homepage = http://www.weechat.org/;
description = "A fast, light and extensible chat client"; description = "A fast, light and extensible chat client";
license = stdenv.lib.licenses.gpl3; license = stdenv.lib.licenses.gpl3;
maintainers = with stdenv.lib.maintainers; [ garbas the-kenny ]; maintainers = with stdenv.lib.maintainers; [ lovek323 garbas the-kenny ];
platforms = stdenv.lib.platforms.linux; platforms = stdenv.lib.platforms.unix;
}; };
} }

View File

@ -13,6 +13,7 @@ buildPythonPackage rec {
doCheck = !stdenv.isDarwin; # error: AF_UNIX path too long doCheck = !stdenv.isDarwin; # error: AF_UNIX path too long
meta = { meta = {
homepage = "http://www.pycrypto.org/"; homepage = "http://www.pycrypto.org/";
description = "Python Cryptography Toolkit"; description = "Python Cryptography Toolkit";

View File

@ -9283,4 +9283,33 @@ rec {
}; };
}; };
pync = buildPythonPackage rec {
version = "1.4";
baseName = "pync";
name = "${baseName}-${version}";
src = fetchurl {
url = "https://pypi.python.org/packages/source/p/${baseName}/${name}.tar.gz";
md5 = "5cc79077f386a17b539f1e51c05a3650";
};
buildInputs = [ pkgs.coreutils ];
propagatedBuildInputs = [ dateutil ];
preInstall = stdenv.lib.optionalString stdenv.isDarwin ''
sed -i 's|^\([ ]*\)self.bin_path.*$|\1self.bin_path = "${pkgs.rubyLibs.terminal_notifier}/bin/terminal-notifier"|' build/lib/pync/TerminalNotifier.py
'';
meta = with stdenv.lib; {
description = "Python Wrapper for Mac OS 10.8 Notification Center";
homepage = https://pypi.python.org/pypi/pync/1.4;
license = licenses.mit;
platforms = platforms.darwin;
maintainers = [ maintainers.lovek323 ];
};
};
}); in pythonPackages }); in pythonPackages