1{ stdenv
2, lib
3, fetchFromGitLab
4, cairo
5, cargo
6, desktop-file-utils
7, gettext
8, glib
9, gtk4
10, libadwaita
11, meson
12, ninja
13, pango
14, pkg-config
15, rustPlatform
16, rustc
17, wrapGAppsHook4
18}:
19
20stdenv.mkDerivation rec {
21 pname = "contrast";
22 version = "0.0.8";
23
24 src = fetchFromGitLab {
25 domain = "gitlab.gnome.org";
26 group = "World";
27 owner = "design";
28 repo = "contrast";
29 rev = version;
30 hash = "sha256-5OFmLsP+Xk3sKJcUG/s8KwedvfS8ri+JoinliyJSmrY=";
31 };
32
33 cargoDeps = rustPlatform.fetchCargoTarball {
34 inherit src;
35 name = "${pname}-${version}";
36 hash = "sha256-8WukhoKMyApkwqPQ6KeWMsL40sMUcD4I4l7UqXf2Ld0=";
37 };
38
39 nativeBuildInputs = [
40 desktop-file-utils
41 gettext
42 meson
43 ninja
44 pkg-config
45 cargo
46 rustPlatform.cargoSetupHook
47 rustc
48 wrapGAppsHook4
49 ];
50
51 buildInputs = [
52 cairo
53 glib
54 gtk4
55 libadwaita
56 pango
57 ];
58
59 meta = with lib; {
60 description = "Checks whether the contrast between two colors meet the WCAG requirements";
61 homepage = "https://gitlab.gnome.org/World/design/contrast";
62 license = licenses.gpl3Plus;
63 maintainers = with maintainers; [ ];
64 platforms = platforms.unix;
65 # never built on aarch64-darwin, x86_64-darwin since first introduction in nixpkgs
66 broken = stdenv.isDarwin;
67 };
68}