fractal: port away from buildRustPackage

The new setup hooks compose better with Meson setup hooks.

Also correct license.
This commit is contained in:
Jan Tojnar 2021-03-14 16:26:12 +01:00
parent eb362f9af9
commit 6f0dd4247b
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4

View File

@ -1,12 +1,9 @@
{ lib, stdenv { lib, stdenv
, fetchFromGitLab , fetchFromGitLab
, nix-update-script , nix-update-script
, fetchpatch
, meson , meson
, ninja , ninja
, gettext , gettext
, cargo
, rustc
, python3 , python3
, rustPlatform , rustPlatform
, pkg-config , pkg-config
@ -24,7 +21,7 @@
, wrapGAppsHook , wrapGAppsHook
}: }:
rustPlatform.buildRustPackage rec { stdenv.mkDerivation rec {
pname = "fractal"; pname = "fractal";
version = "4.4.0"; version = "4.4.0";
@ -36,16 +33,21 @@ rustPlatform.buildRustPackage rec {
sha256 = "DSNVd9YvI7Dd3s3+M0+wE594tmL1yPNMnD1W9wLhSuw="; sha256 = "DSNVd9YvI7Dd3s3+M0+wE594tmL1yPNMnD1W9wLhSuw=";
}; };
cargoSha256 = "xim5sOzeXJjRXbTOg2Gk/LHU0LioiyMK5nSr1LwMPjc="; cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-xim5sOzeXJjRXbTOg2Gk/LHU0LioiyMK5nSr1LwMPjc=";
};
nativeBuildInputs = [ nativeBuildInputs = [
cargo
gettext gettext
meson meson
ninja ninja
pkg-config pkg-config
python3 python3
rustc rustPlatform.rust.cargo
rustPlatform.cargoSetupHook
rustPlatform.rust.rustc
wrapGAppsHook wrapGAppsHook
glib glib
]; ];
@ -76,12 +78,6 @@ rustPlatform.buildRustPackage rec {
patchShebangs scripts/meson_post_install.py scripts/test.sh 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 = { passthru = {
updateScript = nix-update-script { updateScript = nix-update-script {
attrPath = pname; attrPath = pname;
@ -91,7 +87,7 @@ rustPlatform.buildRustPackage rec {
meta = with lib; { meta = with lib; {
description = "Matrix group messaging app"; description = "Matrix group messaging app";
homepage = "https://gitlab.gnome.org/GNOME/fractal"; homepage = "https://gitlab.gnome.org/GNOME/fractal";
license = licenses.gpl3; license = licenses.gpl3Plus;
broken = stdenv.isDarwin; broken = stdenv.isDarwin;
maintainers = with maintainers; [ dtzWill worldofpeace ]; maintainers = with maintainers; [ dtzWill worldofpeace ];
}; };