btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / li / libaccounts-glib / package.nix
blob3ed46996056aec9b71a978c6423decb7237e8698
1 { lib, stdenv, fetchFromGitLab, gitUpdater, meson, mesonEmulatorHook, ninja, glib, check, python3, vala, gtk-doc, glibcLocales
2 , libxml2, libxslt, pkg-config, sqlite, docbook_xsl, docbook_xml_dtd_43, gobject-introspection }:
4 stdenv.mkDerivation rec {
5   pname = "libaccounts-glib";
6   version = "1.27";
8   outputs = [ "out" "dev" "devdoc" "py" ];
10   src = fetchFromGitLab {
11     owner = "accounts-sso";
12     repo = "libaccounts-glib";
13     rev = "VERSION_${version}";
14     hash = "sha256-mLhcwp8rhCGSB1K6rTWT0tuiINzgwULwXINfCbgPKEg=";
15   };
17   nativeBuildInputs = [
18     check
19     docbook_xml_dtd_43
20     docbook_xsl
21     glibcLocales
22     gobject-introspection
23     gtk-doc
24     meson
25     ninja
26     pkg-config
27     vala
28   ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
29     mesonEmulatorHook
30   ];
32   buildInputs = [
33     glib
34     libxml2
35     libxslt
36     python3.pkgs.pygobject3
37     sqlite
38   ];
40   # TODO: send patch upstream to make running tests optional
41   postPatch = lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
42     substituteInPlace meson.build \
43       --replace "subdir('tests')" ""
44   '';
46   LC_ALL = "en_US.UTF-8";
48   mesonFlags = [
49     "-Dinstall-py-overrides=true"
50     "-Dpy-overrides-dir=${placeholder "py"}/${python3.sitePackages}/gi/overrides"
51   ];
53   passthru.updateScript = gitUpdater {
54     rev-prefix = "VERSION_";
55   };
57   meta = with lib; {
58     description = "Library for managing accounts which can be used from GLib applications";
59     homepage = "https://gitlab.com/accounts-sso/libaccounts-glib";
60     platforms = platforms.linux;
61     license = licenses.lgpl21;
62   };