2024-05-15 15:35:15 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, zlib, imagemagick, libpng, glib, pkg-config, libgsf
|
2023-04-29 16:46:19 +00:00
|
|
|
, libxml2, bzip2
|
|
|
|
, autoreconfHook
|
|
|
|
, buildPackages
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "wv";
|
|
|
|
version = "1.2.9";
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "AbiWord";
|
|
|
|
repo = "wv";
|
|
|
|
rev = "wv-${builtins.replaceStrings ["."] ["-"] finalAttrs.version}";
|
|
|
|
hash = "sha256-xcC+/M1EzFqQFeF5Dw9qd8VIy7r8JdKMp2X/GHkFiPA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
nativeBuildInputs = [ pkg-config autoreconfHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ zlib imagemagick libpng glib libgsf libxml2 bzip2 ];
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
configureFlags = [
|
|
|
|
"PKG_CONFIG=${buildPackages.pkg-config}/bin/${buildPackages.pkg-config.targetPrefix}pkg-config"
|
|
|
|
];
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE =
|
|
|
|
# Suppress incompatible function pointer and int conversion errors when building with newer versions of clang 16.
|
|
|
|
lib.optionalString stdenv.cc.isClang "-Wno-error=incompatible-function-pointer-types -Wno-error=int-conversion";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
# autoreconfHook fails hard if these two files do not exist.
|
|
|
|
# The extra move is to work around case-insensitive filesystems.
|
2023-04-29 16:46:19 +00:00
|
|
|
postPatch = ''
|
2024-07-27 06:49:29 +00:00
|
|
|
touch AUTHORS
|
|
|
|
mv CHANGELOG ChangeLog~ && mv ChangeLog~ ChangeLog
|
2023-04-29 16:46:19 +00:00
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
2024-05-15 15:35:15 +00:00
|
|
|
homepage = "https://github.com/AbiWord/wv";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Converter from Microsoft Word formats to human-editable ones";
|
2021-01-15 22:18:51 +00:00
|
|
|
platforms = lib.platforms.unix;
|
2024-05-15 15:35:15 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2024-05-15 15:35:15 +00:00
|
|
|
})
|