2021-01-21 18:00:13 +01:00
|
|
|
{ lib, stdenv
|
2019-06-27 09:16:46 +02:00
|
|
|
, fetchFromGitHub
|
|
|
|
, zlib
|
|
|
|
, expat
|
|
|
|
, cmake
|
|
|
|
, which
|
|
|
|
, libxml2
|
|
|
|
, python3
|
|
|
|
, gettext
|
2019-06-27 09:17:57 +02:00
|
|
|
, doxygen
|
|
|
|
, graphviz
|
|
|
|
, libxslt
|
2019-06-27 09:16:46 +02:00
|
|
|
}:
|
2007-10-01 17:12:41 +02:00
|
|
|
|
2009-04-01 11:04:01 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-06-27 09:16:46 +02:00
|
|
|
pname = "exiv2";
|
2021-06-17 05:06:47 +02:00
|
|
|
version = "0.27.4";
|
2015-02-05 12:16:25 +01:00
|
|
|
|
2020-09-10 21:19:16 +02:00
|
|
|
outputs = [ "out" "dev" "doc" "man" ];
|
2020-09-05 01:12:08 +02:00
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
src = fetchFromGitHub {
|
2018-08-04 19:38:22 +02:00
|
|
|
owner = "exiv2";
|
|
|
|
repo = "exiv2";
|
2019-08-25 18:49:35 +02:00
|
|
|
rev = "v${version}";
|
2021-06-17 05:06:47 +02:00
|
|
|
sha256 = "0m1x79q6i5fw3gr9k0dw0bbl7ym27g9vbmxiamks6yw028xqwc5a";
|
2009-04-01 11:04:01 +02:00
|
|
|
};
|
2017-12-09 18:44:02 +01:00
|
|
|
|
2018-08-04 19:38:22 +02:00
|
|
|
nativeBuildInputs = [
|
2019-06-27 09:16:46 +02:00
|
|
|
cmake
|
2019-06-27 09:17:57 +02:00
|
|
|
doxygen
|
2018-08-04 19:38:22 +02:00
|
|
|
gettext
|
2019-06-27 09:17:57 +02:00
|
|
|
graphviz
|
|
|
|
libxslt
|
2018-08-04 19:38:22 +02:00
|
|
|
];
|
2019-06-27 09:16:46 +02:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
expat
|
|
|
|
zlib
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
libxml2.bin
|
|
|
|
python3
|
|
|
|
which
|
|
|
|
];
|
|
|
|
|
2020-09-05 01:12:08 +02:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DEXIV2_ENABLE_NLS=ON"
|
|
|
|
"-DEXIV2_BUILD_DOC=ON"
|
|
|
|
];
|
|
|
|
|
2019-06-27 09:17:57 +02:00
|
|
|
buildFlags = [
|
2020-09-05 01:12:08 +02:00
|
|
|
"all"
|
2019-06-27 09:17:57 +02:00
|
|
|
"doc"
|
|
|
|
];
|
|
|
|
|
2019-08-26 12:02:45 +02:00
|
|
|
doCheck = true;
|
|
|
|
|
2019-06-27 09:16:46 +02:00
|
|
|
# Test setup found by inspecting ${src}/.travis/run.sh; problems without cmake.
|
|
|
|
checkTarget = "tests";
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
patchShebangs ../test/
|
|
|
|
mkdir ../test/tmp
|
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
${lib.optionalString (stdenv.isAarch64 || stdenv.isAarch32) ''
|
2020-05-02 06:33:29 +02:00
|
|
|
# Fix tests on arm
|
|
|
|
# https://github.com/Exiv2/exiv2/issues/933
|
2019-06-27 09:16:46 +02:00
|
|
|
rm -f ../tests/bugfixes/github/test_CVE_2018_12265.py
|
|
|
|
''}
|
2019-08-26 15:31:31 +02:00
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
${lib.optionalString stdenv.isDarwin ''
|
2020-09-13 06:20:00 +02:00
|
|
|
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}$PWD/lib
|
2019-08-26 15:31:31 +02:00
|
|
|
# Removing tests depending on charset conversion
|
|
|
|
substituteInPlace ../test/Makefile --replace "conversions.sh" ""
|
|
|
|
rm -f ../tests/bugfixes/redmine/test_issue_460.py
|
|
|
|
rm -f ../tests/bugfixes/redmine/test_issue_662.py
|
2020-09-13 06:20:00 +02:00
|
|
|
rm -f ../tests/bugfixes/github/test_issue_1046.py
|
2019-08-26 15:31:31 +02:00
|
|
|
''}
|
2019-06-27 09:16:46 +02:00
|
|
|
'';
|
|
|
|
|
2020-07-16 17:41:32 +02:00
|
|
|
# With CMake we have to enable samples or there won't be
|
2019-06-27 09:16:46 +02:00
|
|
|
# a tests target. This removes them.
|
|
|
|
postInstall = ''
|
|
|
|
( cd "$out/bin"
|
|
|
|
mv exiv2 .exiv2
|
|
|
|
rm *
|
|
|
|
mv .exiv2 exiv2
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.exiv2.org/";
|
2009-04-01 11:04:01 +02:00
|
|
|
description = "A library and command-line utility to manage image metadata";
|
2018-08-05 20:14:27 +02:00
|
|
|
platforms = platforms.all;
|
2018-08-06 12:04:52 +02:00
|
|
|
license = licenses.gpl2Plus;
|
2020-09-05 01:12:08 +02:00
|
|
|
maintainers = [ ];
|
2009-04-01 11:04:01 +02:00
|
|
|
};
|
2007-10-01 17:12:41 +02:00
|
|
|
}
|