2021-05-03 20:48:10 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitLab
|
|
|
|
, docbook-xsl-nons
|
2021-06-28 23:13:55 +00:00
|
|
|
, gi-docgen
|
2021-05-03 20:48:10 +00:00
|
|
|
, gtk-doc
|
2021-06-28 23:13:55 +00:00
|
|
|
, libxml2
|
2022-01-26 04:04:25 +00:00
|
|
|
, meson
|
2021-05-03 20:48:10 +00:00
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, sassc
|
|
|
|
, vala
|
|
|
|
, gobject-introspection
|
2021-06-28 23:13:55 +00:00
|
|
|
, fribidi
|
2021-10-17 02:12:59 +00:00
|
|
|
, glib
|
2021-05-03 20:48:10 +00:00
|
|
|
, gtk4
|
2021-10-17 02:12:59 +00:00
|
|
|
, gnome
|
|
|
|
, gsettings-desktop-schemas
|
2021-05-20 23:08:51 +00:00
|
|
|
, xvfb-run
|
2021-05-03 20:48:10 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libadwaita";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "1.1.1";
|
2021-05-03 20:48:10 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
2021-06-28 23:13:55 +00:00
|
|
|
outputBin = "devdoc"; # demo app
|
2021-05-03 20:48:10 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.gnome.org";
|
|
|
|
owner = "GNOME";
|
|
|
|
repo = "libadwaita";
|
2021-06-28 23:13:55 +00:00
|
|
|
rev = version;
|
2022-04-27 09:35:20 +00:00
|
|
|
hash = "sha256-iCMCQyhCUhp1f20+Qost9nnmfIUFE0iLKMKT/PfwOd4=";
|
2021-05-03 20:48:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
docbook-xsl-nons
|
2021-06-28 23:13:55 +00:00
|
|
|
gi-docgen
|
2021-05-03 20:48:10 +00:00
|
|
|
gtk-doc
|
2021-06-28 23:13:55 +00:00
|
|
|
libxml2 # for xmllint
|
2022-01-26 04:04:25 +00:00
|
|
|
meson
|
2021-05-03 20:48:10 +00:00
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
sassc
|
|
|
|
vala
|
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
"-Dgtk_doc=true"
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
fribidi
|
2021-05-03 20:48:10 +00:00
|
|
|
gobject-introspection
|
2022-01-25 03:21:06 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2021-05-03 20:48:10 +00:00
|
|
|
gtk4
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
2021-10-17 02:12:59 +00:00
|
|
|
gnome.adwaita-icon-theme
|
2021-05-20 23:08:51 +00:00
|
|
|
xvfb-run
|
2021-05-03 20:48:10 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
checkPhase = ''
|
2021-10-17 02:12:59 +00:00
|
|
|
runHook preCheck
|
|
|
|
|
|
|
|
testEnvironment=(
|
|
|
|
# Disable portal since we cannot run it in tests.
|
|
|
|
ADW_DISABLE_PORTAL=1
|
|
|
|
|
|
|
|
# AdwSettings needs to be initialized from “org.gnome.desktop.interface” GSettings schema when portal is not used for color scheme.
|
|
|
|
# It will not actually be used since the “color-scheme” key will only have been introduced in GNOME 42, falling back to detecting theme name.
|
|
|
|
# See adw_settings_constructed function in https://gitlab.gnome.org/GNOME/libadwaita/commit/60ec69f0a5d49cad8a6d79e4ecefd06dc6e3db12
|
2022-01-13 20:06:32 +00:00
|
|
|
"XDG_DATA_DIRS=${glib.getSchemaDataDirPath gsettings-desktop-schemas}"
|
2021-10-17 02:12:59 +00:00
|
|
|
|
|
|
|
# Tests need a cache directory
|
|
|
|
"HOME=$TMPDIR"
|
|
|
|
)
|
|
|
|
env "''${testEnvironment[@]}" xvfb-run \
|
|
|
|
meson test --print-errorlogs
|
|
|
|
|
|
|
|
runHook postCheck
|
2021-05-03 20:48:10 +00:00
|
|
|
'';
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
postInstall = ''
|
|
|
|
mv $out/share/{doc,gtk-doc}
|
|
|
|
'';
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = gnome.updateScript {
|
|
|
|
packageName = pname;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Library to help with developing UI for mobile devices using GTK/GNOME";
|
|
|
|
homepage = "https://gitlab.gnome.org/GNOME/libadwaita";
|
|
|
|
license = licenses.lgpl21Plus;
|
2022-01-26 04:04:25 +00:00
|
|
|
maintainers = teams.gnome.members ++ (with maintainers; [ dotlambda ]);
|
2021-05-03 20:48:10 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|