summary refs log tree commit diff
path: root/pkgs/applications/misc/gpscorrelate/default.nix
blob: 67e246227f06d6255b2af5243944e782b2594d89 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{ lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config, exiv2, libxml2, gtk3
, libxslt, docbook_xsl, docbook_xml_dtd_42, desktop-file-utils, wrapGAppsHook }:

stdenv.mkDerivation rec {
  pname = "gpscorrelate";
  version = "2.0";

  src = fetchFromGitHub {
    owner = "dfandrich";
    repo = pname;
    rev = version;
    sha256 = "1wkpb0nqnm0ik46hp2sibf96h2gxi6n951zm8c72scgmh4ciq4fl";
  };

  patches = [
    (fetchpatch {
      name = "gpscorrelate-2.0-exiv2-0.28.patch";
      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/sci-geosciences/gpscorrelate/files/gpscorrelate-2.0-exiv2-0.28.patch?id=002882203ad6a2b08ce035a18b95844a9f4b85d0";
      hash = "sha256-/5czvSh2siPmohXWHQEg6VWCUQnZxEm2livLsEOAa6c=";
    })
  ];

  nativeBuildInputs = [
    desktop-file-utils
    docbook_xml_dtd_42
    docbook_xsl
    libxslt
    pkg-config
    wrapGAppsHook
  ];

  buildInputs = [
    exiv2
    gtk3
    libxml2
  ];

  makeFlags = [
    "prefix=${placeholder "out"}"
    "CC=${stdenv.cc.targetPrefix}cc"
    "CXX=${stdenv.cc.targetPrefix}c++"
    "CFLAGS=-DENABLE_NLS"
  ];

  doCheck = true;

  installTargets = [ "install" "install-po" "install-desktop-file" ];

  meta = with lib; {
    description = "A GPS photo correlation tool, to add EXIF geotags";

    longDescription = ''
      Digital cameras are cool.  So is GPS.  And, EXIF tags are really
      cool too.

      What happens when you merge the three?  You end up with a set of
      photos taken with a digital camera that are "stamped" with the
      location at which they were taken.

      The EXIF standard defines a number of tags that are for use with GPS.

      A variety of programs exist around the place to match GPS data
      with digital camera photos, but most of them are Windows or
      MacOS only.  Which doesn't really suit me that much. Also, each
      one takes the GPS data in a different format.
    '';

    license = licenses.gpl2Plus;
    homepage = "https://dfandrich.github.io/gpscorrelate/";
    platforms = platforms.unix;
    maintainers = with maintainers; [ sikmir ];
  };
}