about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/tootle/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/misc/tootle/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/misc/tootle/default.nix62
1 files changed, 47 insertions, 15 deletions
diff --git a/nixpkgs/pkgs/applications/misc/tootle/default.nix b/nixpkgs/pkgs/applications/misc/tootle/default.nix
index 4ccf204357ca..e619ab053e7d 100644
--- a/nixpkgs/pkgs/applications/misc/tootle/default.nix
+++ b/nixpkgs/pkgs/applications/misc/tootle/default.nix
@@ -1,14 +1,25 @@
-{ stdenv, fetchFromGitHub
-, meson, ninja, pkgconfig, python3, libgee, gsettings-desktop-schemas
-, gnome3, pantheon, gobject-introspection, wrapGAppsHook
-, gtk3, json-glib, glib, glib-networking, hicolor-icon-theme
+{ stdenv
+, fetchFromGitHub
+, fetchpatch
+, vala
+, meson
+, ninja
+, pkgconfig
+, python3
+, libgee
+, gsettings-desktop-schemas
+, gnome3
+, pantheon
+, wrapGAppsHook
+, gtk3
+, json-glib
+, glib
+, glib-networking
 }:
 
-let
+stdenv.mkDerivation rec {
   pname = "tootle";
   version = "0.2.0";
-in stdenv.mkDerivation {
-  name = "${pname}-${version}";
 
   src = fetchFromGitHub {
     owner = "bleakgrey";
@@ -18,28 +29,49 @@ in stdenv.mkDerivation {
   };
 
   nativeBuildInputs = [
-    gobject-introspection
     meson
     ninja
     pkgconfig
     python3
-    pantheon.vala
+    vala
     wrapGAppsHook
   ];
+
   buildInputs = [
-    gtk3 pantheon.granite json-glib glib glib-networking hicolor-icon-theme
-    libgee gnome3.libsoup gsettings-desktop-schemas
+    glib
+    glib-networking
+    gnome3.libsoup
+    gsettings-desktop-schemas
+    gtk3
+    json-glib
+    libgee
+    pantheon.granite
+  ];
+
+  patches = [
+    # Fix build with Vala 0.46
+    # https://github.com/bleakgrey/tootle/pull/164
+    (fetchpatch {
+      url = "https://github.com/worldofpeace/tootle/commit/0a88bdad6d969ead1e4058b1a19675c9d6857b16.patch";
+      sha256 = "0xyx00pgswnhxxbsxngsm6khvlbfcl6ic5wv5n64x7klk8rzh6cm";
+    })
   ];
 
   postPatch = ''
-    chmod +x ./meson/post_install.py
-    patchShebangs ./meson/post_install.py
+    chmod +x meson/post_install.py
+    patchShebangs meson/post_install.py
   '';
 
+  passthru = {
+    updateScript = pantheon.updateScript {
+      attrPath = pname;
+    };
+  };
+
   meta = with stdenv.lib; {
     description = "Simple Mastodon client designed for elementary OS";
-    homepage    = https://github.com/bleakgrey/tootle;
-    license     = licenses.gpl3;
+    homepage = https://github.com/bleakgrey/tootle;
+    license = licenses.gpl3;
     maintainers = with maintainers; [ dtzWill ];
   };
 }