From e467148f67725e58faf87f963461fb27a32cb9c3 Mon Sep 17 00:00:00 2001
From: Austin Seipp <aseipp@pobox.com>
Date: Mon, 24 Aug 2020 09:07:17 -0500
Subject: [PATCH] librseq: 0.1.0pre54 -> 0.1.0pre70

This also enables the rseq test suite, which requires kernel support on
the host executing the tests. `rseq(2)` has been available in mainline
since 4.18 (resp. LTS availability since 4.19) but the test suite should
gracefully exit otherwise if it's not supported.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
---
 pkgs/development/libraries/librseq/default.nix | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/pkgs/development/libraries/librseq/default.nix b/pkgs/development/libraries/librseq/default.nix
index d4619ba4320..b3029937f8f 100644
--- a/pkgs/development/libraries/librseq/default.nix
+++ b/pkgs/development/libraries/librseq/default.nix
@@ -4,22 +4,27 @@
 
 stdenv.mkDerivation rec {
   pname = "librseq";
-  version = "0.1.0pre54_${builtins.substring 0 7 src.rev}";
+  version = "0.1.0pre70_${builtins.substring 0 7 src.rev}";
 
   src = fetchFromGitHub {
     owner  = "compudj";
     repo   = "librseq";
-    rev    = "152600188dd214a0b2c6a8c66380e50c6ad27154";
-    sha256 = "0mivjmgdkgrr6z2gz3k6q6wgnvyvw9xzy65f6ipvqva68sxhk0mx";
+    rev    = "d1cdec98d476b16ca5e2d9d7eabcf9f1c97e6111";
+    sha256 = "0vgillrxc1knq591gjj99x2ws6q1xpm5dmfrhsxisngfpcnjr10v";
   };
 
   outputs = [ "out" "dev" ];
   nativeBuildInputs = [ autoreconfHook ];
   buildInputs = [ linuxHeaders ];
 
+  doCheck = true;
   separateDebugInfo = true;
   enableParallelBuilding = true;
 
+  patchPhase = ''
+    patchShebangs tests
+  '';
+
   # The share/ subdir only contains a doc/ with a README.md that just describes
   # how to compile the library, which clearly isn't very useful! So just get
   # rid of it anyway.