1 { lib, stdenv, fetchFromGitHub, pkg-config, glib, zlib, libpng, cmake, python3 }:
7 # Fetch a more recent version of the repo containing a more recent lens
9 lensfunDatabase = fetchFromGitHub {
12 rev = "a1510e6f33ce9bc8b5056a823c6d5bc6b8cba033";
13 sha256 = "sha256-qdONyKk873Tq11M33JmznhJMAGd4dqp5KdXdVhfy/Ak=";
18 inherit pname version;
20 src = fetchFromGitHub {
24 sha256 = "sha256-FyYilIz9ssSHG6S02Z2bXy7fjSY51+SWW3v8bm7sLvY=";
27 # replace database with a more recent snapshot
28 # the master branch uses version 2 profiles, while 0.3.3 requires version 1 profiles,
29 # so we run the conversion tool the project provides,
30 # then untar the verson 1 profiles into the source dir before we build
33 python3 ${lensfunDatabase}/tools/lensfun_convert_db_v2_to_v1.py $TMPDIR ${lensfunDatabase}/data/db
35 tar xvf $TMPDIR/db/version_1.tar -C data/db
36 date +%s > data/db/timestamp.txt
43 python3.pkgs.setuptools
44 python3.pkgs.lxml # For the db converison
47 buildInputs = [ glib zlib libpng ];
49 cmakeFlags = [ "-DINSTALL_HELPER_SCRIPTS=OFF" ];
52 platforms = platforms.linux ++ platforms.darwin;
53 maintainers = with maintainers; [ flokli paperdigits ];
54 license = lib.licenses.lgpl3;
55 description = "Opensource database of photographic lenses and their characteristics";
56 homepage = "https://lensfun.github.io";