From a85e23cd6bb1e1fdbb635d466a19075c602e5f42 Mon Sep 17 00:00:00 2001
From: Markus Kowalewski <markus.kowalewski@gmail.com>
Date: Thu, 28 Dec 2017 22:07:28 -0800
Subject: [PATCH] minimodem: 0.19->0.24

---
 pkgs/applications/audio/minimodem/default.nix | 24 ++++++++++++++-----
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/pkgs/applications/audio/minimodem/default.nix b/pkgs/applications/audio/minimodem/default.nix
index 2e293ee4552d..8d179e8eed11 100644
--- a/pkgs/applications/audio/minimodem/default.nix
+++ b/pkgs/applications/audio/minimodem/default.nix
@@ -1,18 +1,29 @@
-{ stdenv, fetchurl, pkgconfig, fftw, fftwSinglePrec, alsaLib, libsndfile, libpulseaudio }:
+{ stdenv, fetchFromGitHub, pkgconfig, autoconf, automake, libtool
+, fftw, fftwSinglePrec, alsaLib, libsndfile, libpulseaudio
+}:
 
 stdenv.mkDerivation rec {
-  version = "0.19";
+  version = "0.24-1";
   pname = "minimodem";
   name = "${pname}-${version}";
 
-  src = fetchurl {
-    url = "http://www.whence.com/${pname}/${name}.tar.gz";
-    sha256 = "003xyqjq59wcjafrdv1b8w34xsn4nvzz51wwd7mqddajh0g4dz4g";
+  src = fetchFromGitHub {
+    owner = "kamalmostafa";
+    repo = "minimodem";
+    rev = "${pname}-${version}";
+    sha256 = "1b5xy36fjcp7vkp115dpx4mlmqg2fc7xvxdy648fb8im953bw7ql";
   };
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkgconfig autoconf automake libtool ];
   buildInputs = [ fftw fftwSinglePrec alsaLib libsndfile libpulseaudio ];
 
+  preConfigure = ''
+    aclocal \
+    && autoheader \
+    && automake --gnu --add-missing \
+    && autoconf
+  '';
+
   meta = {
     description = "General-purpose software audio FSK modem";
     longDescription = ''
@@ -28,3 +39,4 @@ stdenv.mkDerivation rec {
     maintainers = with stdenv.lib.maintainers; [ relrod ];
   };
 }
+