contrast: port away from buildRustPackage

The new setup hooks compose better with Meson setup hooks.

Needed to add libsass – not sure how sass-sys crate built without it before.

+13 -10
+13 -10
pkgs/applications/accessibility/contrast/default.nix
··· 1 - { lib 1 + { stdenv 2 + , lib 2 3 , fetchFromGitLab 3 4 , cairo 4 5 , dbus ··· 7 8 , glib 8 9 , gtk3 9 10 , libhandy_0 11 + , libsass 10 12 , meson 11 13 , ninja 12 14 , pango 13 15 , pkg-config 14 16 , python3 15 - , rustc 16 17 , rustPlatform 17 18 , wrapGAppsHook 18 19 }: 19 20 20 - rustPlatform.buildRustPackage rec { 21 + stdenv.mkDerivation rec { 21 22 pname = "contrast"; 22 23 version = "0.0.3"; 23 24 ··· 30 31 sha256 = "0kk3mv7a6y258109xvgicmsi0lw0rcs00gfyivl5hdz7qh47iccy"; 31 32 }; 32 33 33 - cargoSha256 = "0vi8nv4hkhsgqgz36xacwkk5cxirg6li44nbmk3x7vx7c64hzybq"; 34 + cargoDeps = rustPlatform.fetchCargoTarball { 35 + inherit src; 36 + name = "${pname}-${version}"; 37 + hash = "sha256-ePkPiWGn79PHrMsSEql5OXZW5uRMdTP+w0/DCcm2KG4="; 38 + }; 34 39 35 40 nativeBuildInputs = [ 36 41 desktop-file-utils ··· 39 44 ninja 40 45 pkg-config 41 46 python3 47 + rustPlatform.rust.cargo 48 + rustPlatform.cargoSetupHook 49 + rustPlatform.rust.rustc 42 50 wrapGAppsHook 43 51 glib # for glib-compile-resources 44 52 ]; ··· 49 57 glib 50 58 gtk3 51 59 libhandy_0 60 + libsass 52 61 pango 53 62 ]; 54 63 55 64 postPatch = '' 56 65 patchShebangs build-aux/meson_post_install.py 57 66 ''; 58 - 59 - # Don't use buildRustPackage phases, only use it for rust deps setup 60 - configurePhase = null; 61 - buildPhase = null; 62 - checkPhase = null; 63 - installPhase = null; 64 67 65 68 meta = with lib; { 66 69 description = "Checks whether the contrast between two colors meet the WCAG requirements";