2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2019-09-24 20:54:51 +01:00
|
|
|
, autoreconfHook, linuxHeaders
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "librseq";
|
2020-08-24 15:07:17 +01:00
|
|
|
version = "0.1.0pre70_${builtins.substring 0 7 src.rev}";
|
2019-09-24 20:54:51 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "compudj";
|
|
|
|
repo = "librseq";
|
2020-08-24 15:07:17 +01:00
|
|
|
rev = "d1cdec98d476b16ca5e2d9d7eabcf9f1c97e6111";
|
|
|
|
sha256 = "0vgillrxc1knq591gjj99x2ws6q1xpm5dmfrhsxisngfpcnjr10v";
|
2019-09-24 20:54:51 +01:00
|
|
|
};
|
|
|
|
|
2020-08-24 16:15:29 +01:00
|
|
|
outputs = [ "out" "dev" "man" ];
|
2019-09-24 20:54:51 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
buildInputs = [ linuxHeaders ];
|
|
|
|
|
2020-08-24 16:15:29 +01:00
|
|
|
installTargets = [ "install" "install-man" ];
|
|
|
|
|
2020-08-24 15:07:17 +01:00
|
|
|
doCheck = true;
|
2019-09-24 20:54:51 +01:00
|
|
|
separateDebugInfo = true;
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2020-08-24 15:07:17 +01:00
|
|
|
patchPhase = ''
|
|
|
|
patchShebangs tests
|
|
|
|
'';
|
|
|
|
|
2019-09-24 20:54:51 +01:00
|
|
|
# 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.
|
|
|
|
postInstall = ''
|
|
|
|
rm -rf $out/share
|
|
|
|
'';
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2019-09-24 20:54:51 +01:00
|
|
|
description = "Userspace library for the Linux Restartable Sequence API";
|
|
|
|
homepage = "https://github.com/compudj/librseq";
|
2021-02-18 00:54:30 +00:00
|
|
|
license = licenses.lgpl21Only;
|
2019-09-24 20:54:51 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|