2021-01-11 00:14:34 +00:00
|
|
|
{ stdenv, fetchFromGitHub, pkg-config, glib, zlib, libpng, cmake }:
|
2010-05-03 03:45:52 +00:00
|
|
|
|
2021-01-11 00:14:34 +00:00
|
|
|
let
|
2018-07-18 18:33:13 +00:00
|
|
|
version = "0.3.95";
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "lensfun";
|
2021-01-11 00:29:50 +00:00
|
|
|
|
|
|
|
# Fetch a more recent version of the repo containing a more recent lens
|
|
|
|
# database
|
|
|
|
lensfunDatabase = fetchFromGitHub {
|
|
|
|
owner = "lensfun";
|
|
|
|
repo = "lensfun";
|
|
|
|
rev = "4672d765a17bfef7bc994ca7008cb717c61045d5";
|
|
|
|
sha256 = "00x35xhpn55j7f8qzakb6wl1ccbljg1gqjb93jl9w3mha2bzsr41";
|
|
|
|
};
|
|
|
|
|
2021-01-11 00:14:34 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit pname version;
|
2010-05-03 03:45:52 +00:00
|
|
|
|
2021-01-11 00:14:34 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lensfun";
|
|
|
|
repo = "lensfun";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0isli0arns8bmxqpbr1jnbnqh5wvspixdi51adm671f9ngng7x5r";
|
2010-05-03 03:45:52 +00:00
|
|
|
};
|
|
|
|
|
2021-01-11 00:29:50 +00:00
|
|
|
# replace database with a more recent snapshot
|
|
|
|
postUnpack = ''
|
|
|
|
rm -R source/data/db
|
|
|
|
cp -R ${lensfunDatabase}/data/db source/data
|
|
|
|
'';
|
|
|
|
|
2021-01-11 00:14:34 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2018-03-22 15:55:27 +00:00
|
|
|
buildInputs = [ glib zlib libpng ];
|
2010-05-03 03:45:52 +00:00
|
|
|
|
2021-01-11 00:19:15 +00:00
|
|
|
cmakeFlags = [ "-DINSTALL_HELPER_SCRIPTS=OFF" ];
|
2010-08-18 15:56:40 +00:00
|
|
|
|
2010-05-03 03:45:52 +00:00
|
|
|
meta = with stdenv.lib; {
|
2018-08-01 09:04:22 +00:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2021-01-11 00:15:14 +00:00
|
|
|
maintainers = with maintainers; [ flokli ];
|
2014-06-19 04:19:00 +00:00
|
|
|
license = stdenv.lib.licenses.lgpl3;
|
2010-08-18 15:56:40 +00:00
|
|
|
description = "An opensource database of photographic lenses and their characteristics";
|
2021-01-11 00:14:05 +00:00
|
|
|
homepage = "https://lensfun.github.io";
|
2010-05-03 03:45:52 +00:00
|
|
|
};
|
|
|
|
}
|