nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 118 lines 2.4 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 doxygen, 7 gettext, 8 graphviz, 9 libxslt, 10 removeReferencesTo, 11 libiconv, 12 brotli, 13 expat, 14 inih, 15 zlib, 16 libxml2, 17 python3, 18 which, 19}: 20 21stdenv.mkDerivation (finalAttrs: { 22 pname = "exiv2"; 23 version = "0.28.7"; 24 25 outputs = [ 26 "out" 27 "lib" 28 "dev" 29 "doc" 30 "man" 31 ]; 32 33 src = fetchFromGitHub { 34 owner = "exiv2"; 35 repo = "exiv2"; 36 tag = "v${finalAttrs.version}"; 37 hash = "sha256-a7nPjDjTcwsQeypARvy2rRsv9jpasSSxSyCTLWNDDtA="; 38 }; 39 40 nativeBuildInputs = [ 41 cmake 42 doxygen 43 gettext 44 graphviz 45 libxslt 46 removeReferencesTo 47 ]; 48 49 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ 50 libiconv 51 ]; 52 53 propagatedBuildInputs = [ 54 brotli 55 expat 56 inih 57 zlib 58 ]; 59 60 nativeCheckInputs = [ 61 libxml2.bin 62 python3 63 which 64 ]; 65 66 cmakeFlags = [ 67 "-DEXIV2_ENABLE_NLS=ON" 68 "-DEXIV2_BUILD_DOC=ON" 69 "-DEXIV2_ENABLE_BMFF=ON" 70 ]; 71 72 buildFlags = [ 73 "all" 74 "doc" 75 ]; 76 77 doCheck = true; 78 79 preCheck = '' 80 patchShebangs ../test/ 81 mkdir ../test/tmp 82 83 # template.exv_test (test_regression_allfiles.TestAllFiles.template.exv_test) ... ERROR 84 substituteInPlace ../tests/regression_tests/test_regression_allfiles.py \ 85 --replace-fail '"issue_2403_poc.exv",' '"issue_2403_poc.exv", "template.exv",' 86 '' 87 + lib.optionalString stdenv.hostPlatform.isAarch32 '' 88 # Fix tests on arm 89 # https://github.com/Exiv2/exiv2/issues/933 90 rm -f ../tests/bugfixes/github/test_CVE_2018_12265.py 91 '' 92 + lib.optionalString stdenv.hostPlatform.isDarwin '' 93 export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}$PWD/lib 94 export LC_ALL=C 95 96 # disable tests that requires loopback networking 97 substituteInPlace ../tests/bash_tests/testcases.py \ 98 --replace-fail "def io_test(self):" "def io_disabled(self):" 99 ''; 100 101 preFixup = '' 102 remove-references-to -t ${stdenv.cc.cc} $lib/lib/*.so.*.*.* $out/bin/exiv2 103 ''; 104 105 disallowedReferences = [ stdenv.cc.cc ]; 106 107 # causes redefinition of _FORTIFY_SOURCE 108 hardeningDisable = [ "fortify3" ]; 109 110 meta = { 111 homepage = "https://exiv2.org"; 112 description = "Library and command-line utility to manage image metadata"; 113 mainProgram = "exiv2"; 114 platforms = lib.platforms.all; 115 license = lib.licenses.gpl2Plus; 116 maintainers = with lib.maintainers; [ wegank ]; 117 }; 118})