lomiri.geonames: 0.3.0 -> 0.3.1

This commit is contained in:
OPNA2608 2024-01-28 14:38:27 +01:00
parent caad017639
commit 42ac243ab3

View file

@ -1,7 +1,6 @@
{ stdenv
, lib
, fetchFromGitLab
, fetchpatch
, gitUpdater
, testers
, buildPackages
@ -17,17 +16,18 @@
, withDocumentation ? stdenv.buildPlatform.canExecute stdenv.hostPlatform
, gtk-doc
, pkg-config
, validatePkgConfig
}:
stdenv.mkDerivation (finalAttrs: {
pname = "geonames";
version = "0.3.0";
version = "0.3.1";
src = fetchFromGitLab {
owner = "ubports";
repo = "development/core/geonames";
rev = finalAttrs.version;
hash = "sha256-Mo7Khj2pgdJ9kT3npFXnh1WTSsY/B1egWTccbAXFNY8=";
hash = "sha256-AhRnUoku17kVY0UciHQXFDa6eCH6HQ4ZGIOobCaGTKQ=";
};
outputs = [
@ -39,16 +39,6 @@ stdenv.mkDerivation (finalAttrs: {
"devdoc"
];
patches = [
# Improves install locations of demo & docs
# Remove when https://gitlab.com/ubports/development/core/geonames/-/merge_requests/3 merged & in release
(fetchpatch {
name = "0001-geonames-Use-CMAKE_INSTALL_BINDIR-for-install.patch";
url = "https://gitlab.com/OPNA2608/geonames/-/commit/3bca6d4d02843aed851a0a7480d5cd5ac02b4cda.patch";
hash = "sha256-vwffuMKpIqymYaiGEvnNeVXLmnz5e4aBpg55fnNbjKs=";
})
];
postPatch = ''
patchShebangs src/generate-locales.sh tests/setup-test-env.sh
'';
@ -60,6 +50,7 @@ stdenv.mkDerivation (finalAttrs: {
gettext
glib # glib-compile-resources
pkg-config
validatePkgConfig
] ++ lib.optionals withDocumentation [
docbook-xsl-nons
docbook_xml_dtd_45
@ -84,14 +75,14 @@ stdenv.mkDerivation (finalAttrs: {
];
cmakeFlags = [
"-DWANT_DOC=${lib.boolToString withDocumentation}"
"-DWANT_DEMO=${lib.boolToString withExamples}"
"-DWANT_TESTS=${lib.boolToString finalAttrs.finalPackage.doCheck}"
(lib.cmakeBool "WANT_DOC" withDocumentation)
(lib.cmakeBool "WANT_DEMO" withExamples)
(lib.cmakeBool "WANT_TESTS" finalAttrs.finalPackage.doCheck)
# Keeps finding & using glib-compile-resources from buildInputs otherwise
"-DCMAKE_PROGRAM_PATH=${lib.makeBinPath [ buildPackages.glib.dev ]}"
(lib.cmakeFeature "CMAKE_PROGRAM_PATH" (lib.makeBinPath [ buildPackages.glib.dev ]))
] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
# only for cross without native execute support because the canExecute "emulator" call has a format that I can't get CMake to accept
"-DCMAKE_CROSSCOMPILING_EMULATOR=${stdenv.hostPlatform.emulator buildPackages}"
(lib.cmakeFeature "CMAKE_CROSSCOMPILING_EMULATOR" (stdenv.hostPlatform.emulator buildPackages))
];
preInstall = lib.optionalString withDocumentation ''
@ -109,6 +100,7 @@ stdenv.mkDerivation (finalAttrs: {
meta = with lib; {
description = "Parse and query the geonames database dump";
homepage = "https://gitlab.com/ubports/development/core/geonames";
changelog = "https://gitlab.com/ubports/development/core/geonames/-/blob/${finalAttrs.version}/ChangeLog";
license = licenses.gpl3Only;
maintainers = teams.lomiri.members;
platforms = platforms.all;