summary refs log tree commit diff
path: root/pkgs/applications/audio/gnome-podcasts
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2021-03-14 17:25:45 +0100
committerJan Tojnar <jtojnar@gmail.com>2021-03-14 17:49:07 +0100
commitc3b4d2d0739b4ac78e117506c050a96cea4ea722 (patch)
tree67cf8d509e583b381f2dc5f0768b94f030d1f831 /pkgs/applications/audio/gnome-podcasts
parente3b0f976d44d1b4fee907496d904e3b648d72c26 (diff)
downloadnixpkgs-c3b4d2d0739b4ac78e117506c050a96cea4ea722.tar
nixpkgs-c3b4d2d0739b4ac78e117506c050a96cea4ea722.tar.gz
nixpkgs-c3b4d2d0739b4ac78e117506c050a96cea4ea722.tar.bz2
nixpkgs-c3b4d2d0739b4ac78e117506c050a96cea4ea722.tar.lz
nixpkgs-c3b4d2d0739b4ac78e117506c050a96cea4ea722.tar.xz
nixpkgs-c3b4d2d0739b4ac78e117506c050a96cea4ea722.tar.zst
nixpkgs-c3b4d2d0739b4ac78e117506c050a96cea4ea722.zip
gnome-podcasts: port away from buildRustPackage
The new setup hooks compose better with Meson setup hooks.

Also correct license.
Diffstat (limited to 'pkgs/applications/audio/gnome-podcasts')
-rw-r--r--pkgs/applications/audio/gnome-podcasts/default.nix28
1 files changed, 13 insertions, 15 deletions
diff --git a/pkgs/applications/audio/gnome-podcasts/default.nix b/pkgs/applications/audio/gnome-podcasts/default.nix
index fbd94ebd3d1..6524700ae15 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;
   };