diff --git a/pkgs/development/libraries/libtsm/darwin.patch b/pkgs/development/libraries/libtsm/darwin.patch new file mode 100644 index 000000000000..d447be456e0e --- /dev/null +++ b/pkgs/development/libraries/libtsm/darwin.patch @@ -0,0 +1,37 @@ +From 4e7b7b1124bfbccb43820997164b00720bf5ca31 Mon Sep 17 00:00:00 2001 +From: Florian Gilcher +Date: Sun, 23 Mar 2014 23:05:44 +0100 +Subject: [PATCH] Remove GCC specific flags + +--- + Makefile.am | 10 ++-------- + 1 file changed, 2 insertions(+), 8 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index f1e872b..c011f02 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -69,11 +69,7 @@ AM_CFLAGS = \ + AM_CPPFLAGS = \ + -include $(top_builddir)/config.h \ + -I $(srcdir)/src +-AM_LDFLAGS = \ +- -Wl,--as-needed \ +- -Wl,--gc-sections \ +- -Wl,-z,relro \ +- -Wl,-z,now ++AM_LDFLAGS = + + if BUILD_ENABLE_DEBUG + AM_CFLAGS += -g +@@ -134,9 +130,7 @@ libtsm_la_CPPFLAGS = $(AM_CPPFLAGS) + libtsm_la_LIBADD = libshl.la + EXTRA_libtsm_la_DEPENDENCIES = $(top_srcdir)/docs/libtsm.sym + libtsm_la_LDFLAGS = \ +- $(AM_LDFLAGS) \ +- -version-info $(LIBTSM_CURRENT):$(LIBTSM_REVISION):$(LIBTSM_AGE) \ +- -Wl,--version-script="$(top_srcdir)/docs/libtsm.sym" ++ $(AM_LDFLAGS) + + if BUILD_HAVE_XKBCOMMON + libtsm_la_CPPFLAGS += $(XKBCOMMON_CFLAGS) diff --git a/pkgs/development/libraries/libtsm/default.nix b/pkgs/development/libraries/libtsm/default.nix index 66e1698b11d0..febdb0914d6c 100644 --- a/pkgs/development/libraries/libtsm/default.nix +++ b/pkgs/development/libraries/libtsm/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, libxkbcommon, pkgconfig }: +{ stdenv, lib, fetchurl, libxkbcommon, pkgconfig, autoconf, automake }: stdenv.mkDerivation rec { name = "libtsm-3"; @@ -8,14 +8,22 @@ stdenv.mkDerivation rec { sha256 = "01ygwrsxfii0pngfikgqsb4fxp8n1bbs47l7hck81h9b9bc1ah8i"; }; - buildInputs = [ libxkbcommon pkgconfig ]; + buildInputs = [ libxkbcommon pkgconfig ] ++ lib.optionals stdenv.isDarwin [ + autoconf automake + ]; + + preConfigure = lib.optionalString stdenv.isDarwin '' + aclocal + ''; configureFlags = [ "--disable-debug" ]; - meta = { + patches = lib.optional stdenv.isDarwin ./darwin.patch; + + meta = with lib; { description = "Terminal-emulator State Machine"; homepage = "http://www.freedesktop.org/wiki/Software/kmscon/libtsm/"; - license = stdenv.lib.licenses.mit; - maintainers = [ stdenv.lib.maintainers.shlevy ]; + license = licenses.mit; + maintainers = with maintainers; [ shlevy cstrahan ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 300b9ac4d332..920423b54a2f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7224,7 +7224,9 @@ let libtoxcore = callPackage ../development/libraries/libtoxcore { }; - libtsm = callPackage ../development/libraries/libtsm { }; + libtsm = callPackage ../development/libraries/libtsm { + automake = automake114x; + }; libtunepimp = callPackage ../development/libraries/libtunepimp { };