Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2f7878ac568b
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 501b6d0e13ae
Choose a head ref
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Mar 21, 2018

  1. profanity: refactor build to build from source

    * fix osx build
    * fix undefined macros in configure.ac
    * activate the check phase to run the test suite
    hschaeidt authored and globin committed Mar 21, 2018

    Unverified

    The committer email address is not verified.
    Copy the full SHA
    501b6d0 View commit details
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{ stdenv, fetchurl, pkgconfig, glib, openssl, expat, libmesode
, ncurses, libotr, curl, readline, libuuid
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, glib, openssl
, glibcLocales, expect, ncurses, libotr, curl, readline, libuuid
, cmocka, libmicrohttpd, stabber, expat, libmesode

, autoAwaySupport ? false, libXScrnSaver ? null, libX11 ? null
, notifySupport ? false, libnotify ? null, gdk_pixbuf ? null
@@ -20,18 +21,22 @@ stdenv.mkDerivation rec {
name = "profanity-${version}";
version = "0.5.1";

src = fetchurl {
url = "http://www.profanity.im/profanity-${version}.tar.gz";
sha256 = "1f7ylw3mhhnii52mmk40hyc4kqhpvjdr3hmsplzkdhsfww9kflg3";
src = fetchFromGitHub {
owner = "boothj5";
repo = "profanity";
rev = "${version}";
sha256 = "1ppr02wivhlrqr62r901clnycna8zpn6kr7n5rw8y3zfw21ny17z";
};

patches = [ ./patches/packages-osx.patch ./patches/undefined-macros.patch ];

enableParallelBuilding = true;

nativeBuildInputs = [ pkgconfig ];
nativeBuildInputs = [ autoreconfHook glibcLocales pkgconfig ];

buildInputs = [
readline libuuid libmesode
glib openssl expat ncurses libotr curl
expect readline libuuid glib openssl expat ncurses libotr
curl libmesode cmocka libmicrohttpd stabber
] ++ optionals autoAwaySupport [ libXScrnSaver libX11 ]
++ optionals notifySupport [ libnotify gdk_pixbuf ]
++ optionals traySupport [ gnome2.gtk ]
@@ -45,6 +50,20 @@ stdenv.mkDerivation rec {
++ optionals pgpSupport [ "--enable-pgp" ]
++ optionals pythonPluginSupport [ "--enable-python-plugins" ];

preAutoreconf = ''
mkdir m4
'';

doCheck = true;

LC_ALL = "en_US.utf8";

NIX_CFLAGS_COMPILE = [ ]
++ optionals pythonPluginSupport [ "-I${python}/include/${python.libPrefix}" ];

LDFLAGS = [ ]
++ optionals pythonPluginSupport [ "-L${python}/lib" "-lpython${python.majorVersion}m" ];

meta = {
description = "A console based XMPP client";
longDescription = ''
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
diff --git a/configure.ac b/configure.ac
index 1e55b1cc..0832a387 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,6 @@ AC_CANONICAL_HOST
PLATFORM="unknown"
AS_CASE([$host_os],
[freebsd*], [PLATFORM="freebsd"],
- [darwin*], [PLATFORM="osx"],
[cygwin], [PLATFORM="cygwin"],
[PLATFORM="nix"])
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
diff --git a/configure.ac b/configure.ac
index 1e55b1cc..0832a387 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,12 +81,12 @@ elif test "x$enable_python_plugins" != xno; then
AM_CONDITIONAL([BUILD_PYTHON_API], [true])
AC_DEFINE([HAVE_PYTHON], [1], [Python support])
else
- if test "x$enable_python_plugins" = xyes; then
- AC_MSG_ERROR([Python not found, cannot enable Python plugins.])
- else
- AM_CONDITIONAL([BUILD_PYTHON_API], [false])
- AC_MSG_NOTICE([Python development package not found, Python plugin support disabled.])
- fi
+ AS_IF(
+ [test "x$enable_python_plugins" = xyes],
+ [],
+ [AM_CONDITIONAL([BUILD_PYTHON_API], [false])
+ AC_MSG_NOTICE([Python development package not found, Python plugin support disabled.])]
+ )
fi
AS_IF([test "x$PLATFORM" = xosx], [rm -f Python.framework])
else
@@ -107,7 +105,7 @@ else
[AM_CONDITIONAL([BUILD_C_API], [true]) LIBS="$LIBS -ldl" AC_DEFINE([HAVE_C], [1], [C support])],
[AS_IF(
[test "x$enable_c_plugins" = xyes],
- [AC_MSG_ERROR([dl library needed to run C plugins])],
+ [],
[AM_CONDITIONAL([BUILD_C_API], [false])])
])
else
@@ -116,7 +114,6 @@ else
fi

# threading
-ACX_PTHREAD([], [AC_MSG_ERROR([pthread is required])])
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
AS_IF([test "x$PTHREAD_CC" != x], [ CC="$PTHREAD_CC" ])