about summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers/fractal
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2021-03-14 16:26:12 +0100
committerJan Tojnar <jtojnar@gmail.com>2021-03-14 17:46:32 +0100
commit6f0dd4247b51111acf1539f7eda7bff2a13cc95a (patch)
tree8aacfecfd54bca9daf6ae15025facb7d1d89ae66 /pkgs/applications/networking/instant-messengers/fractal
parenteb362f9af966f04f74ee839f85562008a487eaf9 (diff)
fractal: port away from buildRustPackage
The new setup hooks compose better with Meson setup hooks.

Also correct license.
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/fractal')
-rw-r--r--pkgs/applications/networking/instant-messengers/fractal/default.nix24
1 files 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 14cf45e97bbdf..9f5cd6f69bfdf 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 ];
   };