2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, pkg-config, glib, zlib, libpng, cmake }:
|
2010-05-03 04:45:52 +01:00
|
|
|
|
2021-01-11 00:14:34 +00:00
|
|
|
let
|
2018-07-18 19:33:13 +01:00
|
|
|
version = "0.3.95";
|
2019-08-15 13:41:18 +01: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 04:45:52 +01:00
|
|
|
|
2021-01-11 00:14:34 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lensfun";
|
|
|
|
repo = "lensfun";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0isli0arns8bmxqpbr1jnbnqh5wvspixdi51adm671f9ngng7x5r";
|
2010-05-03 04:45:52 +01: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 04:45:52 +01:00
|
|
|
|
2021-01-11 00:19:15 +00:00
|
|
|
cmakeFlags = [ "-DINSTALL_HELPER_SCRIPTS=OFF" ];
|
2010-08-18 16:56:40 +01:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2018-08-01 10:04:22 +01:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2021-01-11 00:15:14 +00:00
|
|
|
maintainers = with maintainers; [ flokli ];
|
2021-01-21 17:00:13 +00:00
|
|
|
license = lib.licenses.lgpl3;
|
2010-08-18 16:56:40 +01: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 04:45:52 +01:00
|
|
|
};
|
|
|
|
}
|