From fb655dce4cb0984720ca8af916edd9a9f9728d14 Mon Sep 17 00:00:00 2001
From: Michael Alan Dorman <mdorman@ironicdesign.com>
Date: Sun, 24 May 2015 08:00:40 -0400
Subject: [PATCH 1/4] Fix SHA for pasystray.

I presume there's something about how github creates the .zip files such
that they can change SHA.

Please note: this is a very outdated version of pasystray---I don't know
if that's intentional, but perhaps a better strategy would be to update
it wholesale.
---
 pkgs/tools/audio/pasystray/default.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkgs/tools/audio/pasystray/default.nix b/pkgs/tools/audio/pasystray/default.nix
index bbe99eaccbe4..787ab7dd3d61 100644
--- a/pkgs/tools/audio/pasystray/default.nix
+++ b/pkgs/tools/audio/pasystray/default.nix
@@ -6,7 +6,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "https://github.com/christophgysin/pasystray/archive/${name}.zip";
-    sha256 = "1gpb7yqcxqglv50iqbkg2lg3r0z07jm4ir2zqmvns6sgddks590w";
+    sha256 = "0n41qm04kilhc827yx8y1ijslmajg2dxykaf3s3aq6s6bjzzw8bh";
   };
 
   buildInputs = [ unzip autoconf automake makeWrapper pkgconfig 

From bc1b8cb33ac858acad881a19c2383542a1eef8b4 Mon Sep 17 00:00:00 2001
From: Michael Alan Dorman <mdorman@ironicdesign.com>
Date: Sun, 24 May 2015 20:41:34 -0400
Subject: [PATCH 2/4] Update pasystray to current version.

---
 pkgs/tools/audio/pasystray/default.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/tools/audio/pasystray/default.nix b/pkgs/tools/audio/pasystray/default.nix
index 787ab7dd3d61..af8dbe2a4db3 100644
--- a/pkgs/tools/audio/pasystray/default.nix
+++ b/pkgs/tools/audio/pasystray/default.nix
@@ -2,11 +2,11 @@
 , gnome3, avahi, gtk3, libnotify, pulseaudio, x11}:
 
 stdenv.mkDerivation rec {
-  name = "pasystray-0.4.0";
+  name = "pasystray-0.5.2";
 
   src = fetchurl {
     url = "https://github.com/christophgysin/pasystray/archive/${name}.zip";
-    sha256 = "0n41qm04kilhc827yx8y1ijslmajg2dxykaf3s3aq6s6bjzzw8bh";
+    sha256 = "084jld5zk89h4akll73bwhfav6mpg55zmdd5kvlg396rqi9lqkj4";
   };
 
   buildInputs = [ unzip autoconf automake makeWrapper pkgconfig 

From e81c6bd6547b778ffcabb715c516c3f66ef4155a Mon Sep 17 00:00:00 2001
From: Michael Alan Dorman <mdorman@ironicdesign.com>
Date: Mon, 25 May 2015 08:13:21 -0400
Subject: [PATCH 3/4] Use fetchzip to retrieve new pasystray.

---
 pkgs/tools/audio/pasystray/default.nix | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pkgs/tools/audio/pasystray/default.nix b/pkgs/tools/audio/pasystray/default.nix
index af8dbe2a4db3..4efdb9aa9e43 100644
--- a/pkgs/tools/audio/pasystray/default.nix
+++ b/pkgs/tools/audio/pasystray/default.nix
@@ -1,15 +1,15 @@
-{stdenv, fetchurl, unzip, autoconf, automake, makeWrapper, pkgconfig
+{stdenv, fetchzip, autoconf, automake, makeWrapper, pkgconfig
 , gnome3, avahi, gtk3, libnotify, pulseaudio, x11}:
 
 stdenv.mkDerivation rec {
   name = "pasystray-0.5.2";
 
-  src = fetchurl {
+  src = fetchzip {
     url = "https://github.com/christophgysin/pasystray/archive/${name}.zip";
     sha256 = "084jld5zk89h4akll73bwhfav6mpg55zmdd5kvlg396rqi9lqkj4";
   };
 
-  buildInputs = [ unzip autoconf automake makeWrapper pkgconfig 
+  buildInputs = [ autoconf automake makeWrapper pkgconfig 
                   gnome3.defaultIconTheme
                   avahi gtk3 libnotify pulseaudio x11 ];
 

From 1a4c95242297f2b31a140664609eae0bf062b0d9 Mon Sep 17 00:00:00 2001
From: Michael Alan Dorman <mdorman@ironicdesign.com>
Date: Mon, 25 May 2015 17:12:38 -0400
Subject: [PATCH 4/4] And now try fetchFromGitHub

---
 pkgs/tools/audio/pasystray/default.nix | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/pkgs/tools/audio/pasystray/default.nix b/pkgs/tools/audio/pasystray/default.nix
index 4efdb9aa9e43..c542386cb5a7 100644
--- a/pkgs/tools/audio/pasystray/default.nix
+++ b/pkgs/tools/audio/pasystray/default.nix
@@ -1,12 +1,14 @@
-{stdenv, fetchzip, autoconf, automake, makeWrapper, pkgconfig
+{stdenv, fetchFromGitHub, autoconf, automake, makeWrapper, pkgconfig
 , gnome3, avahi, gtk3, libnotify, pulseaudio, x11}:
 
 stdenv.mkDerivation rec {
   name = "pasystray-0.5.2";
 
-  src = fetchzip {
-    url = "https://github.com/christophgysin/pasystray/archive/${name}.zip";
-    sha256 = "084jld5zk89h4akll73bwhfav6mpg55zmdd5kvlg396rqi9lqkj4";
+  src = fetchFromGitHub {
+    owner = "christophgysin";
+    repo = "pasystray";
+    rev = "6709fc1e9f792baf4f7b4507a887d5876b2cfa70";
+    sha256 = "1z21wassdiwfnlcrkpdqh8ylblpd1xxjxcmib5mwix9va2lykdfv";
   };
 
   buildInputs = [ autoconf automake makeWrapper pkgconfig