1{ lib, stdenv, fetchFromGitHub
2, autoreconfHook, linuxHeaders
3}:
4
5stdenv.mkDerivation rec {
6 pname = "librseq";
7 version = "0.1.0pre71_${builtins.substring 0 7 src.rev}";
8
9 src = fetchFromGitHub {
10 owner = "compudj";
11 repo = "librseq";
12 rev = "170f840b498e1aff068b90188727a656111bfc2f";
13 sha256 = "0rdx59y8y9x8cfmmx5gl66gibkzpk3kw5lrrqhrxan8zr37a055y";
14 };
15
16 outputs = [ "out" "dev" "man" ];
17 nativeBuildInputs = [ autoreconfHook ];
18 buildInputs = [ linuxHeaders ];
19
20 installTargets = [ "install" "install-man" ];
21
22 doCheck = true;
23 separateDebugInfo = true;
24 enableParallelBuilding = true;
25
26 patchPhase = ''
27 patchShebangs tests
28 '';
29
30 # The share/ subdir only contains a doc/ with a README.md that just describes
31 # how to compile the library, which clearly isn't very useful! So just get
32 # rid of it anyway.
33 postInstall = ''
34 rm -rf $out/share
35 '';
36
37 meta = with lib; {
38 description = "Userspace library for the Linux Restartable Sequence API";
39 homepage = "https://github.com/compudj/librseq";
40 license = licenses.lgpl21Only;
41 platforms = platforms.linux;
42 maintainers = with maintainers; [ thoughtpolice ];
43 };
44}