at 22.05-pre 45 lines 1.2 kB view raw
1{ lib, stdenv, fetchFromGitHub, pkg-config, glib, zlib, libpng, cmake }: 2 3let 4 version = "0.3.95"; 5 pname = "lensfun"; 6 7 # Fetch a more recent version of the repo containing a more recent lens 8 # database 9 lensfunDatabase = fetchFromGitHub { 10 owner = "lensfun"; 11 repo = "lensfun"; 12 rev = "4672d765a17bfef7bc994ca7008cb717c61045d5"; 13 sha256 = "00x35xhpn55j7f8qzakb6wl1ccbljg1gqjb93jl9w3mha2bzsr41"; 14 }; 15 16in 17stdenv.mkDerivation { 18 inherit pname version; 19 20 src = fetchFromGitHub { 21 owner = "lensfun"; 22 repo = "lensfun"; 23 rev = "v${version}"; 24 sha256 = "0isli0arns8bmxqpbr1jnbnqh5wvspixdi51adm671f9ngng7x5r"; 25 }; 26 27 # replace database with a more recent snapshot 28 postUnpack = '' 29 rm -R source/data/db 30 cp -R ${lensfunDatabase}/data/db source/data 31 ''; 32 33 nativeBuildInputs = [ cmake pkg-config ]; 34 buildInputs = [ glib zlib libpng ]; 35 36 cmakeFlags = [ "-DINSTALL_HELPER_SCRIPTS=OFF" ]; 37 38 meta = with lib; { 39 platforms = platforms.linux ++ platforms.darwin; 40 maintainers = with maintainers; [ flokli ]; 41 license = lib.licenses.lgpl3; 42 description = "An opensource database of photographic lenses and their characteristics"; 43 homepage = "https://lensfun.github.io"; 44 }; 45}