1 { lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config, glib, zlib, libpng, cmake, libxml2, python3 }:
7 # Fetch a more recent version of the repo containing a more recent lens
9 lensfunDatabase = fetchFromGitHub {
12 rev = "ec9412d27d5fa8f377848a59c768b12c243cb80d";
13 sha256 = "sha256-/u/3oQzac/dQrgFaiYvzT5uQ108XarkXnA2DByA5sic=";
18 inherit pname version;
20 src = fetchFromGitHub {
24 sha256 = "0ixf0f7qv0mc7zrw9w1sb60w833g4rqrfj8cjxwzv2vimqcksccz";
29 name = "fix-compilation-with-clang.patch";
30 url = "https://github.com/lensfun/lensfun/commit/5c2065685a22f19f8138365c0e5acf0be8329c02.patch";
31 sha256 = "sha256-tAOCNL37pKE7hfQCu+hUTKLFnRHWF5Dplqf+GaucG+4=";
35 # replace database with a more recent snapshot
36 # the mastr branch uses version 2 profiles, while 0.3.3 requires version 1 profiles,
37 # so we run the conversion tool the project provides,
38 # then untar the verson 1 profiles into the source dir before we build
41 python3 ${lensfunDatabase}/tools/lensfun_convert_db_v2_to_v1.py $TMPDIR ${lensfunDatabase}/data/db
43 tar xvf $TMPDIR/db/version_1.tar -C data/db
44 date +%s > data/db/timestamp.txt
49 python3 python3.pkgs.lxml # For the db converison
52 buildInputs = [ glib zlib libpng ];
54 cmakeFlags = [ "-DINSTALL_HELPER_SCRIPTS=OFF" ];
57 platforms = platforms.linux ++ platforms.darwin;
58 maintainers = with maintainers; [ flokli ];
59 license = lib.licenses.lgpl3;
60 description = "An opensource database of photographic lenses and their characteristics";
61 homepage = "https://lensfun.github.io";