diff options
Diffstat (limited to 'pkgs/applications/accessibility/contrast/default.nix')
-rw-r--r-- | pkgs/applications/accessibility/contrast/default.nix | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/pkgs/applications/accessibility/contrast/default.nix b/pkgs/applications/accessibility/contrast/default.nix index 192bf041c64..44bee86880a 100644 --- a/pkgs/applications/accessibility/contrast/default.nix +++ b/pkgs/applications/accessibility/contrast/default.nix @@ -1,4 +1,5 @@ { stdenv +, lib , fetchFromGitLab , cairo , dbus @@ -6,18 +7,18 @@ , gettext , glib , gtk3 -, libhandy +, libhandy_0 +, libsass , meson , ninja , pango -, pkgconfig +, pkg-config , python3 -, rustc , rustPlatform , wrapGAppsHook }: -rustPlatform.buildRustPackage rec { +stdenv.mkDerivation rec { pname = "contrast"; version = "0.0.3"; @@ -30,15 +31,22 @@ rustPlatform.buildRustPackage rec { sha256 = "0kk3mv7a6y258109xvgicmsi0lw0rcs00gfyivl5hdz7qh47iccy"; }; - cargoSha256 = "0vi8nv4hkhsgqgz36xacwkk5cxirg6li44nbmk3x7vx7c64hzybq"; + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src; + name = "${pname}-${version}"; + hash = "sha256-ePkPiWGn79PHrMsSEql5OXZW5uRMdTP+w0/DCcm2KG4="; + }; nativeBuildInputs = [ desktop-file-utils gettext meson ninja - pkgconfig + pkg-config python3 + rustPlatform.rust.cargo + rustPlatform.cargoSetupHook + rustPlatform.rust.rustc wrapGAppsHook glib # for glib-compile-resources ]; @@ -48,7 +56,8 @@ rustPlatform.buildRustPackage rec { dbus glib gtk3 - libhandy + libhandy_0 + libsass pango ]; @@ -56,13 +65,7 @@ rustPlatform.buildRustPackage rec { patchShebangs build-aux/meson_post_install.py ''; - # Don't use buildRustPackage phases, only use it for rust deps setup - configurePhase = null; - buildPhase = null; - checkPhase = null; - installPhase = null; - - meta = with stdenv.lib; { + meta = with lib; { description = "Checks whether the contrast between two colors meet the WCAG requirements"; homepage = "https://gitlab.gnome.org/World/design/contrast"; license = licenses.gpl3; |