
In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ```
84 lines
2.0 KiB
Nix
84 lines
2.0 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, pkg-config
|
|
, exiv2
|
|
, libxml2
|
|
, gtk3
|
|
, libxslt
|
|
, docbook_xsl
|
|
, docbook_xml_dtd_42
|
|
, desktop-file-utils
|
|
, wrapGAppsHook3
|
|
, desktopToDarwinBundle
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "gpscorrelate";
|
|
version = "2.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "dfandrich";
|
|
repo = "gpscorrelate";
|
|
rev = version;
|
|
hash = "sha256-1t9XUY12hVaUNOg785dMJCiaMMCI2XCcif1DkKYXOoo=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
desktop-file-utils
|
|
docbook_xml_dtd_42
|
|
docbook_xsl
|
|
libxslt
|
|
pkg-config
|
|
wrapGAppsHook3
|
|
] ++ lib.optional stdenv.hostPlatform.isDarwin desktopToDarwinBundle;
|
|
|
|
buildInputs = [
|
|
exiv2
|
|
gtk3
|
|
libxml2
|
|
];
|
|
|
|
makeFlags = [
|
|
"prefix=${placeholder "out"}"
|
|
"CC=${stdenv.cc.targetPrefix}cc"
|
|
"CXX=${stdenv.cc.targetPrefix}c++"
|
|
"CFLAGS=-DENABLE_NLS"
|
|
];
|
|
|
|
doCheck = true;
|
|
|
|
preCheck = ''
|
|
# https://github.com/dfandrich/gpscorrelate/issues/29
|
|
rm tests/data/test005.*
|
|
'';
|
|
|
|
installTargets = [ "install" "install-po" "install-desktop-file" ];
|
|
|
|
meta = with lib; {
|
|
description = "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/";
|
|
changelog = "https://github.com/dfandrich/gpscorrelate/releases/tag/${src.rev}";
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ sikmir ];
|
|
};
|
|
}
|