diff --git a/pkgs/applications/accessibility/contrast/default.nix b/pkgs/applications/accessibility/contrast/default.nix index 689ad2735752..44bee86880a7 100644 --- a/pkgs/applications/accessibility/contrast/default.nix +++ b/pkgs/applications/accessibility/contrast/default.nix @@ -1,4 +1,5 @@ -{ lib +{ stdenv +, lib , fetchFromGitLab , cairo , dbus @@ -7,17 +8,17 @@ , glib , gtk3 , libhandy_0 +, libsass , meson , ninja , pango , pkg-config , python3 -, rustc , rustPlatform , wrapGAppsHook }: -rustPlatform.buildRustPackage rec { +stdenv.mkDerivation rec { pname = "contrast"; version = "0.0.3"; @@ -30,7 +31,11 @@ rustPlatform.buildRustPackage rec { sha256 = "0kk3mv7a6y258109xvgicmsi0lw0rcs00gfyivl5hdz7qh47iccy"; }; - cargoSha256 = "0vi8nv4hkhsgqgz36xacwkk5cxirg6li44nbmk3x7vx7c64hzybq"; + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src; + name = "${pname}-${version}"; + hash = "sha256-ePkPiWGn79PHrMsSEql5OXZW5uRMdTP+w0/DCcm2KG4="; + }; nativeBuildInputs = [ desktop-file-utils @@ -39,6 +44,9 @@ rustPlatform.buildRustPackage rec { ninja pkg-config python3 + rustPlatform.rust.cargo + rustPlatform.cargoSetupHook + rustPlatform.rust.rustc wrapGAppsHook glib # for glib-compile-resources ]; @@ -49,6 +57,7 @@ rustPlatform.buildRustPackage rec { glib gtk3 libhandy_0 + libsass pango ]; @@ -56,12 +65,6 @@ 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 lib; { description = "Checks whether the contrast between two colors meet the WCAG requirements"; homepage = "https://gitlab.gnome.org/World/design/contrast"; diff --git a/pkgs/applications/audio/gnome-podcasts/default.nix b/pkgs/applications/audio/gnome-podcasts/default.nix index fbd94ebd3d16..6524700ae156 100644 --- a/pkgs/applications/audio/gnome-podcasts/default.nix +++ b/pkgs/applications/audio/gnome-podcasts/default.nix @@ -1,11 +1,10 @@ -{ lib +{ stdenv +, lib , rustPlatform , fetchFromGitLab , meson , ninja , gettext -, cargo -, rustc , python3 , pkg-config , glib @@ -18,9 +17,9 @@ , wrapGAppsHook }: -rustPlatform.buildRustPackage rec { - version = "0.4.8"; +stdenv.mkDerivation rec { pname = "gnome-podcasts"; + version = "0.4.8"; src = fetchFromGitLab { domain = "gitlab.gnome.org"; @@ -30,16 +29,21 @@ rustPlatform.buildRustPackage rec { sha256 = "0y2332zjq7vf1v38wzwz98fs19vpzy9kl7y0xbdzqr303l59hjb1"; }; - cargoSha256 = "1jbii9k4bkrivdk1ffr6556q1sgk9j4jbzwnn8vbxmksyl1x328q"; + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src; + name = "${pname}-${version}"; + hash = "sha256-GInRA/V61r42spb/JYlM8+mATSkmOxdm2zHPRWaKcck="; + }; nativeBuildInputs = [ meson ninja pkg-config gettext - cargo - rustc python3 + rustPlatform.rust.cargo + rustPlatform.cargoSetupHook + rustPlatform.rust.rustc wrapGAppsHook glib ]; @@ -57,12 +61,6 @@ rustPlatform.buildRustPackage rec { gst_all_1.gst-plugins-good ]; - # use Meson/Ninja phases - configurePhase = null; - buildPhase = null; - checkPhase = null; - installPhase = null; - # tests require network doCheck = false; @@ -74,7 +72,7 @@ rustPlatform.buildRustPackage rec { meta = with lib; { description = "Listen to your favorite podcasts"; homepage = "https://wiki.gnome.org/Apps/Podcasts"; - license = licenses.gpl3; + license = licenses.gpl3Plus; maintainers = teams.gnome.members; platforms = platforms.unix; }; diff --git a/pkgs/applications/audio/shortwave/default.nix b/pkgs/applications/audio/shortwave/default.nix index 96433221e932..36ee6c12eef9 100644 --- a/pkgs/applications/audio/shortwave/default.nix +++ b/pkgs/applications/audio/shortwave/default.nix @@ -1,10 +1,11 @@ -{ lib +{ stdenv +, lib , fetchFromGitLab -, cargo , dbus , desktop-file-utils , gdk-pixbuf , gettext +, gitMinimal , glib , gst_all_1 , gtk3 @@ -14,13 +15,12 @@ , openssl , pkg-config , python3 -, rustc , rustPlatform , sqlite , wrapGAppsHook }: -rustPlatform.buildRustPackage rec { +stdenv.mkDerivation rec { pname = "shortwave"; version = "1.1.1"; @@ -32,18 +32,24 @@ rustPlatform.buildRustPackage rec { sha256 = "1vlhp2ss06j41simjrrjg38alp85jddhqyvccy6bhfzm0gzynwld"; }; - cargoSha256 = "181699rlpr5dszc18wg0kbss3gfskxaz9lpxpgsc4yfb6ip89qnk"; + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src; + name = "${pname}-${version}"; + hash = "sha256-0+KEbjTLecL0u/3S9FWf2r2h9ZrgcRTY163kS3NKJqA="; + }; nativeBuildInputs = [ - cargo desktop-file-utils gettext + gitMinimal glib # for glib-compile-schemas meson ninja pkg-config python3 - rustc + rustPlatform.rust.cargo + rustPlatform.cargoSetupHook + rustPlatform.rust.rustc wrapGAppsHook ]; @@ -62,12 +68,6 @@ rustPlatform.buildRustPackage rec { gst-plugins-bad ]); - # Don't use buildRustPackage phases, only use it for rust deps setup - configurePhase = null; - buildPhase = null; - checkPhase = null; - installPhase = null; - postPatch = '' patchShebangs build-aux/meson/postinstall.py ''; diff --git a/pkgs/applications/networking/instant-messengers/fractal/default.nix b/pkgs/applications/networking/instant-messengers/fractal/default.nix index 14cf45e97bbd..9f5cd6f69bfd 100644 --- a/pkgs/applications/networking/instant-messengers/fractal/default.nix +++ b/pkgs/applications/networking/instant-messengers/fractal/default.nix @@ -1,12 +1,9 @@ { lib, stdenv , fetchFromGitLab , nix-update-script -, fetchpatch , meson , ninja , gettext -, cargo -, rustc , python3 , rustPlatform , pkg-config @@ -24,7 +21,7 @@ , wrapGAppsHook }: -rustPlatform.buildRustPackage rec { +stdenv.mkDerivation rec { pname = "fractal"; version = "4.4.0"; @@ -36,16 +33,21 @@ rustPlatform.buildRustPackage rec { sha256 = "DSNVd9YvI7Dd3s3+M0+wE594tmL1yPNMnD1W9wLhSuw="; }; - cargoSha256 = "xim5sOzeXJjRXbTOg2Gk/LHU0LioiyMK5nSr1LwMPjc="; + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src; + name = "${pname}-${version}"; + hash = "sha256-xim5sOzeXJjRXbTOg2Gk/LHU0LioiyMK5nSr1LwMPjc="; + }; nativeBuildInputs = [ - cargo gettext meson ninja pkg-config python3 - rustc + rustPlatform.rust.cargo + rustPlatform.cargoSetupHook + rustPlatform.rust.rustc wrapGAppsHook glib ]; @@ -76,12 +78,6 @@ rustPlatform.buildRustPackage rec { patchShebangs scripts/meson_post_install.py scripts/test.sh ''; - # Don't use buildRustPackage phases, only use it for rust deps setup - configurePhase = null; - buildPhase = null; - checkPhase = null; - installPhase = null; - passthru = { updateScript = nix-update-script { attrPath = pname; @@ -91,7 +87,7 @@ rustPlatform.buildRustPackage rec { meta = with lib; { description = "Matrix group messaging app"; homepage = "https://gitlab.gnome.org/GNOME/fractal"; - license = licenses.gpl3; + license = licenses.gpl3Plus; broken = stdenv.isDarwin; maintainers = with maintainers; [ dtzWill worldofpeace ]; };