about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/feedreaders/newsflash/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/feedreaders/newsflash/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/networking/feedreaders/newsflash/default.nix32
1 files changed, 19 insertions, 13 deletions
diff --git a/nixpkgs/pkgs/applications/networking/feedreaders/newsflash/default.nix b/nixpkgs/pkgs/applications/networking/feedreaders/newsflash/default.nix
index e8a76b3d491a..ac7af8e53b37 100644
--- a/nixpkgs/pkgs/applications/networking/feedreaders/newsflash/default.nix
+++ b/nixpkgs/pkgs/applications/networking/feedreaders/newsflash/default.nix
@@ -1,4 +1,5 @@
 { lib
+, stdenv
 , rustPlatform
 , fetchFromGitLab
 , meson
@@ -17,25 +18,33 @@
 , gst_all_1
 }:
 
-rustPlatform.buildRustPackage rec {
+stdenv.mkDerivation rec {
   pname = "newsflash";
-  version = "1.1.1";
+  version = "1.4.0";
 
   src = fetchFromGitLab {
     owner = "news-flash";
     repo = "news_flash_gtk";
     rev = version;
-    sha256 = "1z47h23g87dqmr9sfjl36fs5xjm2wj7z2bri9g0a4jcpwzl5awsd";
+    hash = "sha256-EInI5Unaz9m8/gJ7vAzJVyMynJGq0KZh12dNK8r1wnY=";
   };
 
-  cargoSha256 = "0rnrdh9ganj63hf9j890yj9pahcgza95z7x020w72mbb4648hq26";
+  cargoDeps = rustPlatform.fetchCargoTarball {
+    inherit src;
+    name = "${pname}-${version}";
+    hash = "sha256-xrWZhjfYnO6M3LMTP6l3+oZOusvUWuRBDesIlsiEJ6s=";
+  };
 
   patches = [
+    # Post install tries to generate an icon cache & update the
+    # desktop database. The gtk setup hook drop-icon-theme-cache.sh
+    # would strip out the icon cache and the desktop database wouldn't
+    # be included in $out. They will generated by xdg.mime.enable &
+    # gtk.iconCache.enable instead.
     ./no-post-install.patch
   ];
 
   postPatch = ''
-    chmod +x build-aux/cargo.sh
     patchShebangs .
   '';
 
@@ -50,7 +59,11 @@ rustPlatform.buildRustPackage rec {
 
     # Provides glib-compile-resources to compile gresources
     glib
-  ];
+  ] ++ (with rustPlatform; [
+    cargoSetupHook
+    rust.cargo
+    rust.rustc
+  ]);
 
   buildInputs = [
     gtk3
@@ -72,13 +85,6 @@ rustPlatform.buildRustPackage rec {
     gst-plugins-bad
   ]);
 
-  # Unset default rust phases to use meson & ninja instead
-  configurePhase = null;
-  buildPhase = null;
-  checkPhase = null;
-  installPhase = null;
-  installCheckPhase = null;
-
   meta = with lib; {
     description = "A modern feed reader designed for the GNOME desktop";
     homepage = "https://gitlab.com/news-flash/news_flash_gtk";