2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, cmake, libgsf, glib, libxml2 }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-09-18 10:52:07 +00:00
|
|
|
pname = "wv2";
|
|
|
|
version = "0.4.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
2021-09-18 10:52:07 +00:00
|
|
|
url = "mirror://sourceforge/wvware/wv2-${version}.tar.bz2";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "1p1qxr8z5bsiq8pvlina3c8c1vjcb5d96bs3zz4jj3nb20wnsawz";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./fix-include.patch ];
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
# Newer versions of clang default to C++17, which removes some deprecated APIs such as bind1st.
|
|
|
|
# Setting the language version to C++14 makes them available again.
|
|
|
|
cmakeFlags = lib.optionals stdenv.cc.isClang [ (lib.cmakeFeature "CMAKE_CXX_STANDARD" "14") ];
|
|
|
|
|
|
|
|
# Linking gobject explicitly fixes missing symbols (such as missing `_g_object_unref`) on Darwin.
|
2024-09-26 11:04:55 +00:00
|
|
|
preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
2024-07-27 06:49:29 +00:00
|
|
|
export NIX_LDFLAGS+=" $(pkg-config gobject-2.0 --libs)"
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
buildInputs = [ libgsf glib libxml2 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Excellent MS Word filter lib, used in most Office suites";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "wv2-config";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.lgpl2;
|
2023-02-22 10:55:15 +00:00
|
|
|
homepage = "https://wvware.sourceforge.net";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|