nixpkgs/pkgs/by-name/li/libchamplain/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

90 lines
1.9 KiB
Nix

{ fetchurl
, lib
, stdenv
, meson
, ninja
, vala
, gtk-doc
, docbook_xsl
, docbook_xml_dtd_412
, pkg-config
, glib
, gtk3
, cairo
, sqlite
, gnome
, clutter-gtk
, libsoup
, libsoup_3
, gobject-introspection /*, libmemphis */
, withLibsoup3 ? false
}:
stdenv.mkDerivation rec {
pname = "libchamplain";
version = "0.12.21";
outputs = [ "out" "dev" ]
++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" ];
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "qRXNFyoMUpRMVXn8tGg/ioeMVxv16SglS12v78cn5ac=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
gobject-introspection
vala
] ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [
gtk-doc
docbook_xsl
docbook_xml_dtd_412
];
buildInputs = [
sqlite
(if withLibsoup3 then libsoup_3 else libsoup)
];
propagatedBuildInputs = [
glib
gtk3
cairo
clutter-gtk
];
mesonFlags = [
(lib.mesonBool "gtk_doc" (stdenv.buildPlatform == stdenv.hostPlatform))
"-Dvapi=true"
(lib.mesonBool "libsoup3" withLibsoup3)
];
passthru = {
updateScript = gnome.updateScript {
packageName = pname;
versionPolicy = "odd-unstable";
};
};
meta = with lib; {
homepage = "https://gitlab.gnome.org/GNOME/libchamplain";
license = licenses.lgpl2Plus;
description = "C library providing a ClutterActor to display maps";
longDescription = ''
libchamplain is a C library providing a ClutterActor to display
maps. It also provides a GTK widget to display maps in GTK
applications. Python and Perl bindings are also available. It
supports numerous free map sources such as OpenStreetMap,
OpenCycleMap, OpenAerialMap, and Maps for free.
'';
maintainers = teams.gnome.members ++ teams.pantheon.members;
platforms = platforms.unix;
};
}