about summary refs log tree commit diff
path: root/pkgs/development/libraries/lensfun/default.nix
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2021-01-11 01:29:50 +0100
committerFlorian Klink <flokli@flokli.de>2021-01-12 15:28:25 +0100
commit9137be6daa6274f8fcd1a362ab75cf777375c09d (patch)
tree0baa33c857b8ebd3c005b48ba541baed452ca060 /pkgs/development/libraries/lensfun/default.nix
parentc939d8f1999d0452aca081939f5a9ff743e31ec7 (diff)
lensfun: update database to a more recent snapshot
lensfun hasn't had a new release since quite some time, and the database
updater doesn't work in NixOS
(https://github.com/NixOS/nixpkgs/issues/99009).

This replaces the database with a more recent snapshot during build,
thus adding support for more recent camera models/lenses (as reported in
https://github.com/NixOS/nixpkgs/issues/107304)
Diffstat (limited to 'pkgs/development/libraries/lensfun/default.nix')
-rw-r--r--pkgs/development/libraries/lensfun/default.nix16
1 files changed, 16 insertions, 0 deletions
diff --git a/pkgs/development/libraries/lensfun/default.nix b/pkgs/development/libraries/lensfun/default.nix
index c27a2c4daa7bd..e9e8d3447b9c7 100644
--- a/pkgs/development/libraries/lensfun/default.nix
+++ b/pkgs/development/libraries/lensfun/default.nix
@@ -3,6 +3,16 @@
 let
   version = "0.3.95";
   pname = "lensfun";
+
+  # Fetch a more recent version of the repo containing a more recent lens
+  # database
+  lensfunDatabase = fetchFromGitHub {
+    owner = "lensfun";
+    repo = "lensfun";
+    rev = "4672d765a17bfef7bc994ca7008cb717c61045d5";
+    sha256 = "00x35xhpn55j7f8qzakb6wl1ccbljg1gqjb93jl9w3mha2bzsr41";
+  };
+
 in
 stdenv.mkDerivation {
   inherit pname version;
@@ -14,6 +24,12 @@ stdenv.mkDerivation {
     sha256 = "0isli0arns8bmxqpbr1jnbnqh5wvspixdi51adm671f9ngng7x5r";
   };
 
+  # replace database with a more recent snapshot
+  postUnpack = ''
+    rm -R source/data/db
+    cp -R ${lensfunDatabase}/data/db source/data
+  '';
+
   nativeBuildInputs = [ cmake pkg-config ];
   buildInputs = [ glib zlib libpng ];