nixpkgs/pkgs/applications/accessibility/contrast/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

76 lines
1.5 KiB
Nix
Raw Normal View History

{ stdenv
, lib
2019-09-16 16:42:11 +02:00
, fetchFromGitLab
, cairo
, desktop-file-utils
, gettext
, glib
, gtk4
, libadwaita
2019-09-16 16:42:11 +02:00
, meson
, ninja
, pango
, pkg-config
2019-09-16 16:42:11 +02:00
, python3
, rustPlatform
, wrapGAppsHook4
2019-09-16 16:42:11 +02:00
}:
stdenv.mkDerivation rec {
2019-09-16 16:42:11 +02:00
pname = "contrast";
version = "0.0.5";
2019-09-16 16:42:11 +02:00
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
group = "World";
owner = "design";
repo = "contrast";
rev = version;
sha256 = "cypSbqLwSmauOoWOuppWpF3hvrxiqmkLspxAWzvlUC0=";
2019-09-16 16:42:11 +02:00
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-W4FyqwJpimf0isQRCq9TegpTQPQfsumx40AFQCFG5VQ=";
};
2019-09-16 16:42:11 +02:00
nativeBuildInputs = [
desktop-file-utils
gettext
meson
ninja
pkg-config
2019-09-16 16:42:11 +02:00
python3
rustPlatform.rust.cargo
rustPlatform.cargoSetupHook
rustPlatform.rust.rustc
wrapGAppsHook4
glib # for glib-compile-resources
2019-09-16 16:42:11 +02:00
];
buildInputs = [
cairo
glib
gtk4
libadwaita
2019-09-16 16:42:11 +02:00
pango
];
postPatch = ''
patchShebangs build-aux/meson_post_install.py
# 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"
2019-09-16 16:42:11 +02:00
'';
meta = with lib; {
2019-09-16 16:42:11 +02:00
description = "Checks whether the contrast between two colors meet the WCAG requirements";
homepage = "https://gitlab.gnome.org/World/design/contrast";
license = licenses.gpl3Plus;
2019-09-16 16:42:11 +02:00
maintainers = with maintainers; [ jtojnar ];
platforms = platforms.unix;
2019-09-16 16:42:11 +02:00
};
}