From b06987437d22b3b2d7171e789719525ed8beca48 Mon Sep 17 00:00:00 2001
From: Leon Schuermann <leon.git@is.currently.online>
Date: Sun, 14 Oct 2018 11:09:38 +0200
Subject: [PATCH 1/2] libwacom: 0.29 -> 0.31

---
 pkgs/development/libraries/libwacom/default.nix | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pkgs/development/libraries/libwacom/default.nix b/pkgs/development/libraries/libwacom/default.nix
index 67563e41d01f..fbecc39abf68 100644
--- a/pkgs/development/libraries/libwacom/default.nix
+++ b/pkgs/development/libraries/libwacom/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "libwacom-${version}";
-  version = "0.29";
+  version = "0.31";
 
   src = fetchurl {
-    url = "mirror://sourceforge/linuxwacom/libwacom/${name}.tar.bz2";
-    sha256 = "1diklgcjhmvcxi9p1ifp6wcnyr6k7z9jhrlzfhzjqd6zipk01slw";
+    url = "https://github.com/linuxwacom/libwacom/releases/download/${name}/${name}.tar.bz2";
+    sha256 = "00xzkxhm0s9bvhbf27hscjbh17wa8lcgvxjqbmzm527f9cjqrm8q";
   };
 
   nativeBuildInputs = [ pkgconfig ];

From d5845200ca3301067f9b0aa5118abc632472c75f Mon Sep 17 00:00:00 2001
From: Leon Schuermann <leon.git@is.currently.online>
Date: Mon, 15 Oct 2018 08:37:16 +0200
Subject: [PATCH 2/2] libwacom: build from source instead of release tarball

---
 pkgs/development/libraries/libwacom/default.nix | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/pkgs/development/libraries/libwacom/default.nix b/pkgs/development/libraries/libwacom/default.nix
index fbecc39abf68..6cfc5060b610 100644
--- a/pkgs/development/libraries/libwacom/default.nix
+++ b/pkgs/development/libraries/libwacom/default.nix
@@ -1,15 +1,17 @@
-{ fetchurl, stdenv, glib, pkgconfig, udev, libgudev }:
+{ stdenv, fetchFromGitHub, autoreconfHook, glib, pkgconfig, udev, libgudev }:
 
 stdenv.mkDerivation rec {
   name = "libwacom-${version}";
   version = "0.31";
 
-  src = fetchurl {
-    url = "https://github.com/linuxwacom/libwacom/releases/download/${name}/${name}.tar.bz2";
-    sha256 = "00xzkxhm0s9bvhbf27hscjbh17wa8lcgvxjqbmzm527f9cjqrm8q";
+  src = fetchFromGitHub {
+    owner = "linuxwacom";
+    repo = "libwacom";
+    rev = "libwacom-${version}";
+    sha256 = "0qjd4bn2abwzic34cm0sw3srx02spszbsvfdbzbpn2cb62b5gjmw";
   };
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkgconfig autoreconfHook ];
   buildInputs = [ glib udev libgudev ];
 
   meta = with stdenv.lib; {