2021-03-15 08:37:03 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitLab
|
|
|
|
, cairo
|
|
|
|
, desktop-file-utils
|
|
|
|
, gettext
|
|
|
|
, glib
|
2022-02-10 20:34:41 +00:00
|
|
|
, gtk4
|
|
|
|
, libadwaita
|
2020-04-24 23:36:52 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pango
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, python3
|
|
|
|
, rustPlatform
|
2022-02-10 20:34:41 +00:00
|
|
|
, wrapGAppsHook4
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2021-03-15 08:37:03 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "contrast";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "0.0.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.gnome.org";
|
|
|
|
group = "World";
|
|
|
|
owner = "design";
|
|
|
|
repo = "contrast";
|
|
|
|
rev = version;
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "cypSbqLwSmauOoWOuppWpF3hvrxiqmkLspxAWzvlUC0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-15 08:37:03 +00:00
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
inherit src;
|
|
|
|
name = "${pname}-${version}";
|
2022-02-10 20:34:41 +00:00
|
|
|
hash = "sha256-W4FyqwJpimf0isQRCq9TegpTQPQfsumx40AFQCFG5VQ=";
|
2021-03-15 08:37:03 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
desktop-file-utils
|
|
|
|
gettext
|
|
|
|
meson
|
|
|
|
ninja
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
python3
|
2021-03-15 08:37:03 +00:00
|
|
|
rustPlatform.rust.cargo
|
|
|
|
rustPlatform.cargoSetupHook
|
|
|
|
rustPlatform.rust.rustc
|
2022-02-10 20:34:41 +00:00
|
|
|
wrapGAppsHook4
|
2020-04-24 23:36:52 +00:00
|
|
|
glib # for glib-compile-resources
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
cairo
|
|
|
|
glib
|
2022-02-10 20:34:41 +00:00
|
|
|
gtk4
|
|
|
|
libadwaita
|
2020-04-24 23:36:52 +00:00
|
|
|
pango
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs build-aux/meson_post_install.py
|
2022-02-10 20:34:41 +00:00
|
|
|
# https://gitlab.gnome.org/World/design/contrast/-/merge_requests/23
|
|
|
|
substituteInPlace build-aux/meson_post_install.py \
|
|
|
|
--replace "gtk-update-icon-cache" "gtk4-update-icon-cache"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Checks whether the contrast between two colors meet the WCAG requirements";
|
|
|
|
homepage = "https://gitlab.gnome.org/World/design/contrast";
|
2022-02-10 20:34:41 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ jtojnar ];
|
2022-02-10 20:34:41 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|