From 6f0dd4247b51111acf1539f7eda7bff2a13cc95a Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 14 Mar 2021 16:26:12 +0100 Subject: [PATCH] fractal: port away from buildRustPackage The new setup hooks compose better with Meson setup hooks. Also correct license. --- .../instant-messengers/fractal/default.nix | 24 ++++++++----------- 1 file changed, 10 insertions(+), 14 deletions(-) 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 ]; };